unknown
2013-04-25 15:12:36 UTC
Hi,
Yesterday I implemented, for the umpteenth time, the init-function. (I
guess being taught Haskell at one point could be blamed partly for the
coding style requiring this function...) It is a trivial function that I
think should be part of the standard lists module. This patch adds the
function, tests in lists_SUITE, and documentation of the function.
The implementation is trivial: reverse(tl(reverse(List))).
If I've missed some religious reason for not having this function feel
free to drop the patch ;-)
Cheers,
Hans
git fetch git://github.com/hanssv/otp.git add_init_to_lists
https://github.com/hanssv/otp/compare/erlang:maint...add_init_to_lists
https://github.com/hanssv/otp/compare/erlang:maint...add_init_to_lists.patch
Yesterday I implemented, for the umpteenth time, the init-function. (I
guess being taught Haskell at one point could be blamed partly for the
coding style requiring this function...) It is a trivial function that I
think should be part of the standard lists module. This patch adds the
function, tests in lists_SUITE, and documentation of the function.
The implementation is trivial: reverse(tl(reverse(List))).
If I've missed some religious reason for not having this function feel
free to drop the patch ;-)
Cheers,
Hans
git fetch git://github.com/hanssv/otp.git add_init_to_lists
https://github.com/hanssv/otp/compare/erlang:maint...add_init_to_lists
https://github.com/hanssv/otp/compare/erlang:maint...add_init_to_lists.patch