Defining and Using Proceduresin Different Ways
; Creating and using a function, stored as the
; Value of a symbol:
> (let ((double (lambda (x)(+ x x))))
(double 7) )
14
; Creating a procedure, without using
; “defun syntax”:
> (define triple
(lambda (x)(* 3 x)) )
> (triple 7)
21
Previous slide
Next slide
Back to first slide
View graphic version