erlang - Error on creating a Map -


i reading doc of elixir , executing related codes, fine until part http://elixir-lang.org/getting_started/7.html. part says:

iex> map = %{:a => 1, 2 => :b} %{2 => :b, :a => 1} iex> map[:a] 1 iex> map[2] :b 

but if same in laptop error:

iex(1)> map = %{:a => 1, 2 => :b} ** (syntaxerror) iex:1: invalid token: %{:a => 1, 2 => :b} 

what doing wrong?? idea?

elixir version: elixir 0.10.3 erlang version: rlang/otp 17 [erts-6.0] [source-07b8f44] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace] 

you have outdated elixir version on laptop (0.10.3). maps introduced in version 0.13.0


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -