Speed up data access in Elixir
Gaspar Chilingarov
292

Thanks for the nice article.

I think I noticed a small mistake though: In your example for map access by pattern matching you write

%{^:foo => foo_value} = map

but this is not valid syntax:

invalid argument for unary operator ^, expected an existing variable, got: ^:foo

It would certainly right if the key you want to match on is not known at compile-time, but since :foo already is an atom, there is no need for the ^ sign in front of it.