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

Re: reduce metaoperator on an empty list

Thread Previous | Thread Next
From:
Sam Vilain
Date:
June 6, 2005 17:31
Subject:
Re: reduce metaoperator on an empty list
Message ID:
42A4EAF0.3020307@vilain.net
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...

Sam.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About