Blob
1 (defun fold-right (op init seq)2 (if (null seq)3 init4 (funcall op5 (car seq)6 (fold-right op init (cdr seq)))))7 (defun fold-left (op init seq)8 (labels (9 (iter (result rest)10 (if (null rest)11 result12 (iter (funcall op result (car rest))13 (cdr rest)))))14 (iter init seq)))15 (fold-right #'* 1 '(1 2 3 4 5))16 (fold-left #'* 1 '(1 2 3 4 5))