Skip to content

Land of Lisp Learning

Chapter 6.5 - lambda functions

Declaring a lambda that will halve a given number

(lambda (n) (/ n 2))

Using the above lambda to halve all the numbers in a list

(mapcar  (lambda (n) (/ n 2))  '(2 4 6))