You can use lazy streams to do it one step:
coll
|> Stream.with_index
|> Enum.each(...)
Hey guys,Right now in Elixir there is Enum.with_index that returns tuple that has index and value of the element. You have to have two steps to add indexes to collection and iterate over that collection. Would that be useful work on and submit pull request for Enum.each_with_index?
--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.