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

*To*: scheme@mc.lcs.mit.edu*Subject*: The generality of define*From*: Kirchner@CSNET-RELAY.ARPA, Roger <rkirchne%carleton.csnet@CSNET-RELAY.ARPA>*Date*: Thu ,10 Apr 86 16:18:00 EDT*Cc*: rkirchne%carleton.csnet@CSNET-RELAY.ARPA

One of my students has discovered that the template syntax for defining procedures is quite general, a fact which might be obvious, but should be pointed out. Although I knew that (define (square x) (* x x)) is equivalent to (define square (lambda (x) (* x x))), I did not realize that something like (define ((linear a b) x) (+ a (* b x))) is possible and is equivalent to (define (linear a b) (lambda (x) (+ (* b x)))). Roger Kirchner, Carleton College

- Prev by Date:
**arg lists to APPLY** - Next by Date:
**The generality of define** - Previous by thread:
**arg lists to APPLY** - Next by thread:
**The generality of define** - Index(es):