develooper Front page | perl.perl6.language | Postings from June 2005

Re: reduce metaoperator on an empty list

Thread Previous | Thread Next
Sam Vilain
June 6, 2005 17:31
Re: reduce metaoperator on an empty list
Message ID:
Damian Conway wrote:
> What you want is:
>     $product = ([*] @values err 0);
> Or:
>     $factorial = ([*] 1..$n err 1);

The "err" operator bind only to the point on the instruction it is
attached to, ie it's not a shortcut for eval(), right?

I'm just seeing some edge cases here for custom defined operators; you
don't want exceptions getting silently converted to default values...


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About