Define

A special form, (define), exists to assigning a value of an identifier. It can be used both for initializing variables and for defining functions. Given the following definitions,

   (define one 1)
  
   (define (inc x) (+ one x))
  

the call (inc 3) would, predictably, return '4'. The (define) special form cannot be used to modify the value of an identifier once it has been initialized.

Binding

The binding special form, (let), allows you to define and initialize a group of local variables, which can be be calculated off of the arguments:

   (let ((var-1  (value-1))
         (var-2 (value-2))
         ; ...
         (var-n (value-n)))
        (expression))
  

Contents Previous Next