(Back to Lecture)

Recall the function map:

map(Function, List)

= apply Function to each element of a list to yield a new  list

e.g.

  

map(sq, [1, 2, 3, 4])

==>     [1, 4, 9, 16]


map(cube, [1, 2, 3, 4])

==>     [1, 8, 27, 64]

 

To Next Slide To Previous Slide To Contents