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

Re: reduce metaoperator on an empty list

Thread Previous | Thread Next
Michele Dondi
May 19, 2005 01:50
Re: reduce metaoperator on an empty list
Message ID:
On Wed, 18 May 2005, Matt Fowles wrote:

> All~
> What does the reduce metaoperator do with an empty list?

Interesting. Mathematically an empty sum is zero and an empty product is 
one. Maybe each operator {c,s}hould have an associated method returning 
its neutral element for [] to use it on empty lists, so that it would 
probably return undef on empty lists.

Just my 2 Eurocents,
It was part of the dissatisfaction thing.  I never claimed I was a
nice person.
- David Kastrup in comp.text.tex, "Re: verbatiminput double spacing"

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