[plt-scheme] Should < work with just one argument?

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Mon Apr 18 16:03:06 EDT 2005

Paul Schlie wrote:

>>MzScheme intentionally requires at least two arguments for `<'. It used
>>to accept one, but after try it for a while, that generality was deemed
>>to be potentially more confusing than useful.

> Although two arguments are necessary for a literal comparison; it would
> occasionally be convenient, and seemingly consistent, to accept N arguments;
> thereby allowing (eval `(< ,@(args))) to evaluate without errors when all as
> may be desired to verify that the elements provided as arguments (if any)
> are ordered as specified; which seems likely more useful than an error,
> which typically never seems to be as useful as a generalized behavior?

In most cases one can write:

     (eval `(< -inf.0 ,@(args)))

Jens Axel Søgaard

Posted on the users mailing list.