Function map-apply
map-apply aFunction aList
Repeatedly executes a function.
- Parameters:
- aFunction -
A function object.
- aList -
A list where each element is also a list. The elements in these list
will be passed as arguments to aFunction each time
it is called.
- Returns:
-
A list containing the successive return values of
aFunction.
-
Invokes aFunction as many times as the number of elements
in aList. The elements of aList are lists.
Each time aFunction is called it will be passed as arguments
the elements of one of the lists contained in aList.
The map-apply function could be defined as follows:
define map-apply ( aFunction aList ) {
map [lambda args { apply $aFunction $args }] $aList
}
Report a bug or request new features
© 2002