When working with collections it's often convenient to grab the first 
element that comes to hand. I find myself writing this a lot:

`Enum.take(collection, 1)` or `Enum.at(collection, 0)`

How about a function `Enum.take/1` which takes only the collection and 
returns the "first" value (I avoid naming it `Enum.first/1` since some 
collections may not have any concept of ordering).

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/d676a2de-61e3-449f-9711-9be90436db32%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to