Applying a Procedure to Successive Elements of a List (the MAP way)
; Here’s a simpler way:
> (map add1 '(1 2 3 4 99.9))
(2 3 4 5 100.9)
; OK for functions that take multiple args:
> (map cons '(a b c) '(1 2 3))
((A . 1) (B . 2) (C . 3))
Previous slide
Next slide
Back to first slide
View graphic version