Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

the key is an atom called foobar, and the value is being extracted to a variable called foobar. The variable's value is not shown in the example.

You do this quite a bit in Elixir, unless you use the . syntax, e.g. somemap.foobar which is marginally slower.



Got it - I misunderstood the short code sample, I thought the 2nd half of the tuple was a literal instead of a variable. Makes sense.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: