diff --git a/chapter2.lisp b/chapter2.lisp index fa14ef6..e0d5e44 100644 --- a/chapter2.lisp +++ b/chapter2.lisp @@ -141,3 +141,7 @@ and upper bound." (defun square-list-mapcar (items) (mapcar #'(lambda (x) (* x x)) items)) + +;; Exercise 2.23 +(defun for-each (func thing) + (mapcar func thing))