[r6rs-discuss] Comparison procedures' number of arguments

Alan Bawden Scheme at Bawden.Org
Mon Oct 20 02:10:32 EDT 2008


   Date: Sun, 19 Oct 2008 21:31:53 -0400
   From: John Cowan <cowan at ccil.org>
   Cc: r6rs-discuss at lists.r6rs.org

   Thomas Lord scripsit:

   >   2a) sequence predicates should not be primitive in Scheme

   Such was the case until R4RS.  In RRRS and R3RS, the two-argument
   version was standardized, and it was documented that some
   implementations allowed more than two arguments.  The language about
   monotonic sequences goes back to RRRS....

I am pretty sure that that language was borrowed from the Common Lisp
specification.

In Common Lisp these predicates all accept ONE or more arguments.  It would
be interesting to know why it was decided to specify them that way -- but
personally I don't recall why we did that.  It wasn't because Lisp Machine
Lisp did it that way, because on the Lisp Machines, these functions
demanded at least TWO arguments.  One of the other ancestors of Common Lisp
may have worked that way, or we may have taken that step ourselves.

I can't help thinking that the following puzzle may have had something to
do with it:

    (< a b c) == (and (< a b) (< b c))
    (< a b)   == (and (< a b))
    (< a)     == (and)
    (<)       == ???



More information about the r6rs-discuss mailing list