Post

I don't know who needs to hear this, but this works in #ElixirLang (new line after :foo is key): if true, do: (:foo :bar) Can you guess what it returns?

0 reposts4 likes

`:bar` as what you have inside parens is a code block. It is the same as if true do :foo :bar end Just written in a funky way.

In theory that would be equivalent to `__block__(1, 2)`, but that will be rejected by the compiler/interpreter. Elixir is funky sometimes.