[erlang-patches] Minor additions to the lists stdlib module

Jeremy Ong jeremy@REDACTED
Sun Dec 16 06:57:59 CET 2012


git fetch git://github.com/jeremyong/otp.git lists_module_additions

https://github.com/jeremyong/otp/compare/erlang:master...jeremyong:lists_module_additions

https://github.com/jeremyong/otp/compare/erlang:master...jeremyong:lists_module_additions.patch

I have added a few convenience functions for operating on lists in the
stdlib.

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.

Cheers,
Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20121215/b4dcfe76/attachment.htm>


More information about the erlang-patches mailing list