Next: Selecting elements from a
Up: Higher Order Functions
Previous: Converting all elements in
This abstraction illustrates the usefulness of the
abstraction `curry'. `mapc' converts the `map' function,
which takes two arguments into a function expecting only
Converting the `map' function: `mapc'
The `map' functionexpects a modifier and a list as arguments.
The modifier is applied to all elements of the list. If for
a certain application the modifier remains constant but the list
varies from case to case, it seems to be useful to have a function
that expects only the list as argument. Such a function is
built by `mapc'.
Georg P. Loczewski