Invalid Elixir block syntax in "Gleam for Elixir Users"
jpalardy opened this issue Β· comments
Jonathan Palardy commented
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
x = do
print(1)
2
end
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)
inoas commented
This seems to be correct?
iex(1)> x = (
...(1)> IO.puts(1)
...(1)> 2
...(1)> )
1
2
iex(2)> x
2
iex(3)>
inoas commented
Jonathan Palardy commented
Yep, that works π
Should I open a PR, or you've got it?