I’m studying some tutorial about elixir
but I have a problem finding the solution in this example
nola = %{ name: "New Orleans", founded: 1718 }
field = "founded"
%{^field: city_founded} = nola
** (SyntaxError) iex:14: syntax error before: field
#I try with atom
field = :founded
%{^field: city_founded} = nola
** (SyntaxError) iex:15: syntax error before: field
#with Charlist
field = 'founded'
%{^field: city_founded} = nola
** (SyntaxError) iex:16: syntax error before: field
In the manual it show that this is correct, but it didn’t work in my IEx 1.6.5 (compiled with OTP 19)