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

Re: reduce metaoperator on an empty list

Thread Previous | Thread Next
Edward Cherlin
May 21, 2005 22:36
Re: reduce metaoperator on an empty list
Message ID:
On Friday 20 May 2005 07:18, John Macdonald wrote:
> Is there a built-in operator that doesn't have a meaningful
> identity value?  


> I first thought of exponentiation, but it has 
> an identity value of 1 - you just have to realize that since
> it is a right associative operator, the identity has to be
> applied from the right.
> I suspect that if people ever get into writing code that works
> on operators instead of data, there would be additional uses
> found for the identity attribute (and there may be additional
> operator attributes that make sense there too, although none
> come immediately to mind).  

APL and J programmers have lots of examples.

Edward Cherlin
Generalist & activist--Linux, languages, literacy and more
"A knot! Oh, do let me help to undo it!"
--Alice in Wonderland

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