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

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Apr 18 11:18:02 EDT 2005

At Sun, 17 Apr 2005 13:13:15 -0700, Eric Hanchrow wrote:
>     $ mzscheme
>     Welcome to MzScheme version 299.102, Copyright (c) 2004-2005 PLT Scheme, 
> Inc.
>     > (< 3 4)
>     #t
>     > (< 3)
>     <: expects at least 2 arguments, given 1: 3
>     > 
> 
> R5RS says
> 
>          - procedure: < x1 x2 x3 ...
> and
>          <thing1> <thing2> ...
> 
>         indicates one or more occurrences of a <thing>.

But

  <thing1> <thing2> <thing3> ...

means two or more occurrences of a <thing>.

> So I read R5RS as saying that the procedure < should accept one or
> more arguments, but mzscheme's < seems to demand two.  Is this a bug?

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.

Matthew



Posted on the users mailing list.