in reply to List module providing any,all and none

Looks nice. The Language::Functional module provides any and all in a more functional style and it would be interesting to compare the two:
use Language::Functional ':all'; $x = any { even(shift) } [1, 2, 3]; # 1 $x = all { odd(shift) } [1, 1, 3]; # 1

-Mark

Replies are listed 'Best First'.
Re: Re: List module providing any,all and none
by eric256 (Parson) on Apr 15, 2004 at 17:58 UTC

    It does but you can't easily do something like if any(@list) > 1 { You can also do my $larger = any(@list1) > all(@list2); which provids the list of any numbers in list 1 larger than all numbers in list 2. :)


    ___________
    Eric Hodges