Loop Expansion


> (trans '(defun za (l) (sum l)) 'loop)

(DEFUN ZA (L)
  (MAKE-LOOP L ITEM61 (TOTAL62)
    (SETQ TOTAL62 0)
    (INCF TOTAL62 ITEM61)
    TOTAL62))

> (trans * 'list)

(DEFUN ZA (L)
  (LET (PTR63 ITEM61 TOTAL62)
    (SETQ TOTAL62 0)
    (SETQ PTR63 L)
    (WHILE PTR63
      (SETQ ITEM61 (FIRST PTR63))
      (SETQ PTR63 (REST PTR63))
      (INCF TOTAL62 ITEM61))
    TOTAL62))

> (eval *)

> (za '(1 2 3 4 5))
15

Contents    Page-10    Prev    Next    Page+10    Index