3 ms·
Looks a lot like Elixir's pattern matching to extract values from maps. someMap = {1, 2} {foo, bar} = someMap foo # 1 bar # 2
by sergiotapia 10y ago
Looks a lot like Elixir's pattern matching to extract values from maps.
someMap = {1, 2}
{foo, bar} = someMap
foo # 1
bar # 2
- int_19h 10y agoThis is destructuring assignment, as practiced by many languages before. Pretty much anything in the ML family, for example.