[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Wired numeric predicates?

    I understand your rationale for not wanting numeric predicates to be special
    forms.  The reason I brought it up was that I am a Teaching Assistant in an
    undergrad course this term that uses Scheme.  A student raised the issue since
    it seems natural to think of (< x1 x2 x3...) as being the AND of each of the
    individual two-step comparisons.  The resemblence between this and the AND
    form were sufficiently strong that the student conveniently ignored the fact
    that we explicitly describe < as being a *procedure* and not as a *special
    form*...  I guess people naturally don't look carefully at things that they
    consider ``intuitively obvious''. (Actually, MIT Scheme also defines AND to be
    a procedure, but we had blown this at the time... the student wanted to know
    about MACScheme).

Minor comments:

6.001 Scheme has AND as a procedure because SICP used it that way.
AND is a special form in MIT Scheme, of which 6.001 is not a subset.

I haven't thought about it carefully, but it may not be reasonable
(unless it is defined that way) to implement n-ary < and friends as
the "AND accumulation" of binary <.  Comparisons between exact and
inexact numbers should coerce the exact numbers to inexact, and this
value may have to be used consistently afterwards.