<div>git fetch git://<a href="http://github.com/jeremyong/otp.git">github.com/jeremyong/otp.git</a> lists_module_additions<br></div><div><br></div><div><a href="https://github.com/jeremyong/otp/compare/erlang:master...jeremyong:lists_module_additions">https://github.com/jeremyong/otp/compare/erlang:master...jeremyong:lists_module_additions</a><br>
</div><div><br></div><div><a href="https://github.com/jeremyong/otp/compare/erlang:master...jeremyong:lists_module_additions.patch">https://github.com/jeremyong/otp/compare/erlang:master...jeremyong:lists_module_additions.patch</a><br>
</div><div><br></div>I have added a few convenience functions for operating on lists in the stdlib.<div><br></div><div>These functions are ifoldl, ifoldr, imap, ifilter, and ipartition (the i stands for "index).</div>
<div><br></div><div>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.</div>
<div><br></div><div>I have tried to follow all directions outlined in the github wiki and appreciate any and all feedback.</div><div><br></div><div>Cheers,<br>Jeremy</div>