

Underscore Perl - zeeone
https://github.com/vti/underscore-perl

======
jerf
This is... not useful. Perl doesn't have a (weak) functional-programming gap
that needs fixing that badly in the first place. The big clue should have been
when map had to be defined in terms of... map. Perl's map can be used directly
to do the vast bulk of things in that file:

    
    
        # reducing; folding is obvious from here
        my $accum = 0;
        map { $accum += $_ } @nums;
    
        # filter
        map { $_ ? ($_) : () } @list;
        # also grep, of course, but if you want to filter and
        # do other things it's useful
    
        # flattening
        map { @$_ } @arrayrefs;
    

For the rest, just look at the source code and observe, for instance, the
pointless wrapping of List::Utils::uniq for unique. Far more idiomatic or
established ways of doing all (or almost all, with the remainder being easily
fixed up from CPAN) these things exist in the core shipped modules. The actual
use of this library is almost certain to be both klunkier _and_ less idiomatic
and readable than what Perl ships with out of the box.

Underscore is not the _sine qua non_ of weak functional programming.

~~~
zeeone
You're being too harsh. I think Underscore.pm provides an unified interface to
a lot of missing array functions. Big deal that it overlaps some existing
CPAN/Core Perl functionality. I would easily replace the List::* modules with
this.

