blob: 573024d5d0d2f7238eb0176acfe18fe91dc53e1f [file] [log] [blame]
swissChili74348422021-07-04 13:23:24 -07001(defun mapcar (func list)
2 (if list
3 (cons (apply func (list (car list)))
4 (mapcar func (cdr list)))
5 nil))
6
7(defun double (n)
8 (+ n n))
9
swissChiliddc97542021-07-04 11:47:42 -070010(defun main ()
swissChili74348422021-07-04 13:23:24 -070011 (print (mapcar #'double
12 (list 1 2 3 4 5))))