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

The generality of define



MIT Scheme has recognized the

     (define ((linear a b) x) (+ a (* b x)))

syntax for a few years.  It was suggested by a student as an extension
to the usual

     (define (square x) (* x x))

syntax.  The (obvious) reason being that in the same way that

(square 5) evaluates to the value of (* 5 5)

((linear 2 3) 4) evaluates to the value of (+ 2 (* 3 4))