[erlang-patches] Minor additions to the lists stdlib module
Sun Dec 16 06:57:59 CET 2012
git fetch git://github.com/jeremyong/otp.git lists_module_additions
I have added a few convenience functions for operating on lists in the
These functions are ifoldl, ifoldr, imap, ifilter, and ipartition (the i
stands for "index).
Often times, the index of an element is important when transforming a list
(for example, if I want to perform an operation on an odd-indexed elements
or tag each element of a list with the index formatted in some way). These
functions are very similar to the usual ones but the lambdas passed to them
take an additional argument which is the index of each element as it gets
passed to the lambda.
I have tried to follow all directions outlined in the github wiki and
appreciate any and all feedback.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-patches