Next: , Previous: , Up: compiler dircalls   [Index]


17.9.3 Example: cond syntaxes

cond syntaxes are expanded as follows:

(cond ((this X)
       => (lambda (Y)
            (that Y)))
      (else
       (those)))

becomes:

(let ((t (this X)))
  (if t
      ((lambda (Y) (that Y)) t)
    (those)))

which contains a direct call, which will be optimised to:

(let ((t (this X)))
  (if t
      (let ((Y t)) (that Y))
    (those)))