From: Robert Dober Date: 2009-04-18T06:17:23+09:00 Subject: [ANN] Junctions for Ruby1.9 (Lab419::functional-0.1.2) Hi list Lab419::functional contains an implementation of Perl6's junctions now http://rubyforge.org/frs/?group_id=3824&release_id=33503 Enjoy Junctions A pure Ruby implementation of Junctions as planned for Perl6. [1] Junctions are composite expressions that reply to methods as would their elements. E.g. any(1, 2, 3) > 2 --> true [ 1, 3, 5 ].all.odd? --> true none( 1 ).zero? --> true all() == nil --> true any() == nil --> false A popular use case is if any( "--help", "-?", "-h" ) == param then usage Junctions can be constructed by either * using the module methods any, all, none and one of Lab419::Junctions or * by using junction methods of enumerables (1..3).all > 0 or * by including Lab419::Junctions For details please see the references below. [1] http://en.wikipedia.org/wiki/Perl_6#Junctions http://search.cpan.org/dist/Perl6-Junction/lib/Perl6/Junction.pm http://www.perl.com/pub/a/2003/07/29/exegesis6.html?page=4 http://www.programmersheaven.com/2/Perl6-FAQ-Junctions