fREWdiculous!
26 Jan
I was driving today and I realized that join is just a form of reduce. Here’s some perl6:
It works exactly as expected.
Reduce is powerful, no wonder they made it a hyper-operator in Perl6. All of List::Util functions (save shuffle) can be implemented using only reduce, as the author shows in the module’s documentation (http://search.cpan.org/~gbarr/Scalar-List-Utils-1.19/lib/List/Util.pm)
Name (*)
E-mail (*)
URI
Copyright © 2007 - A Foolish Manifesto - is proudly powered by WordPress Nearly all content related to SuperCollider Programming and Perl Programming. Illacrimo Theme is created by: Design Disease brought to you by LifeSpy.
One Response for "Join = reduce"
Reduce is powerful, no wonder they made it a hyper-operator in Perl6. All of List::Util functions (save shuffle) can be implemented using only reduce, as the author shows in the module’s documentation (http://search.cpan.org/~gbarr/Scalar-List-Utils-1.19/lib/List/Util.pm)
Leave a reply