I would like to propose an Enum.index/2 function. It behaves like
with_index/2 but the index is the first argument:

    iex> Enum.index([:a, :b, :c])
    [{0, :a}, {1, :b}, {2, :c}]

I am hoping it reads "index" this tuple (hence the index as the first
element. While with_index means attach an index information to each element
(hence the second element). Is this sound?

Thank you,

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4K6h7c1UbiEfoEsyCXGJRbO8he%3DFJ84yxC%2B3-GOo-2MwQ%40mail.gmail.com.

Reply via email to