Map
is a function which takes another function and applies it to each item in a list, returning the new list.
1 2 3 |
|
Using only head
and tail
as defined by the List ADT, implement map
.
Use your implementation of map
to apply the function
1 2 |
|
to the list .