Yesterday I wrote code like the following:

[x: 1, y: 2 | [z: 3]]

I was really surprised when it didn't compile:

** (CompileError) iex:1: undefined function |/2
    (stdlib) lists.erl:1354: :lists.mapfoldl/3
    (stdlib) lists.erl:1355: :lists.mapfoldl/3

The non-shorthand version works fine.

[{:x, 1}, {:y, 2} | [z: 3]]
#=> [x: 1, y: 2, z: 3]

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/6e89a635-6642-4f42-ace8-4a36119fa4e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to