Open jpalardy opened 7 months ago
I was reading the Blocks section of the Gleam for Elixir Users and I was surprised by this syntax — when I tried it in iex, it's not valid Elixir
iex
x = do print(1) 2 end
(code link)
Maybe there is a syntax, but I couldn't find it 🤔
(I saw 1.14 in the screenshot, but I tried 1.15 and 1.16 too: same problem)
1.14
1.15
1.16
This seems to be correct?
iex(1)> x = ( ...(1)> IO.puts(1) ...(1)> 2 ...(1)> ) 1 2 iex(2)> x 2 iex(3)>
https://hexdocs.pm/elixir/1.16.1/syntax-reference.html#blocks ... same for ages https://hexdocs.pm/elixir/1.8.0/syntax-reference.html#blocks
Yep, that works 👍
Should I open a PR, or you've got it?
I was reading the Blocks section of the Gleam for Elixir Users and I was surprised by this syntax — when I tried it in
iex
, it's not valid Elixir(code link)
Maybe there is a syntax, but I couldn't find it 🤔
(I saw
1.14
in the screenshot, but I tried1.15
and1.16
too: same problem)