When Spaces Matter in Elixir

Spaces: the final frontier in keeping your code from compiling
%{touch: "The Sky"}
|> Map.get(:touch)
iex> %{touch: "The Sky"}
%{touch: "The Sky"}
iex> |> Map.get(:touch)
** (SyntaxError) iex:3:1: syntax error before: '|>'
iex> (
%{touch: "The Sky"}
|> Map.get(:touch)
)
"The Sky"
<html>
<head>
<?php include('header.php'); ?>
</head>
...
</html>
<title>My Title</title>
<meta name="description" content="Madness">
<html>
<head>
<title>My Title</title>
<meta name="description" content="Madness">
</head>
...
</html>

--

--

--

Code person.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Docker Bench for Security for Docker Daemon

How to Block the Access to Certain Websites on Linux

An Alternative Flutter BLoC Arch

How to insert data into Heroku Postgres table from Visual Studio Code and write back to Salesforce?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Everett Griffiths

Everett Griffiths

Code person.

More from Medium

Building a simple Calendly clone with Phoenix LiveView (pt. 6)

Creating a form using Phoenix LiveView since release of v0.16

TIL: Custom timestamps fields in Elixir

Elixir Mix podcast