; we define a function that returns 6 if the input x ; is 3, otherwise it returns x (defun my-replace (x) (cond ((equal x 3) 6) (t x) ) ) ; we "map" this function over a list (mapcar #'my-replace '(1 2 3 4 5 6)) ; we should get: (1 2 6 4 5 6) (quit)