[Haskell-cafe] Re: sections of noncommutative operators

Bill Wood william.wood3 at comcast.net
Sat Sep 9 13:41:16 EDT 2006

On Sat, 2006-09-09 at 11:17 +0100, Jón Fairbairn wrote:
   . . .
> I should think so. But does lisp have currying these days? 
> (lessp 0 1) ==> T
> but (lessp 0) would be an error, wouldn't it?

For Scheme, R5RS, Section 6.2.5 specifies that "<" and ">" take two or
more arguments, and PLT Scheme raises an exception on "(< 0)".

For Common Lisp, CLtL2 specifies for =, /=, <. >, <=, >= that "These
functions take one or more arguments" (p. 293).  "(< x1 ...)" is true
when the arguments form a monotonically increasing sequence, and clearly
a singleton sequence is monotonic.  In the CLISP implementation of
Common Lisp "(< 0)" returns "T".  BTW there is no "lessp" in CL.

As you noted, CL and Scheme do not support currying.  However, SRFI 16
(Scheme Request for Implementation, a quasi-standard mechanism for
introducing extension libraries into Scheme) provides a "Notation for
Specializing Parameters without Currying" as a syntactic sugar for
nested lambdas.

 -- Bill Wood

More information about the Haskell-Cafe mailing list