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

Re: reduce metaoperator on an empty list

Thread Previous | Thread Next
From:
Michele Dondi
Date:
May 19, 2005 01:55
Subject:
Re: reduce metaoperator on an empty list
Message ID:
Pine.LNX.4.62.0505191052080.27669@pilsner.pcteor1.mi.infn.it
On Wed, 18 May 2005, Rob Kinyon wrote:

>> 1) undef (which may or may not contain an exception), or
>> 2) some unit/identity value that is a trait of the operator,
>>
>> depending on whether or not people think (2) is actually a good idea.
>
> I would think that the Principle of Least Surprise points to (1),

I don't think so. I, for one, would expect [+]; to return zero and [*]; to 
return 1. But that's only because I {trust,expect} perl(6) to be smart 
enough to DWIM.


Michele
-- 
\renewcommand\labelitemi{\textcolor{yellow}{\textbullet}}
would change the colour of the first-level bullet, and improve the
document so's i can't see the bullets.
- Robin Fairbairns in comp.text.tex

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