On Friday 20 May 2005 07:18, John Macdonald wrote: > Is there a built-in operator that doesn't have a meaningful > identity value?
Certainly. > 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 http://cherlin.blogspot.com