the
map
of
(
list ,
functionName )
map
(
list ,
functionName )
List yields a list
. FunctionName yields the name of a function.
put map((1,4,9,16,25), "sqrt") -- prints 1,2,3,4,5
The map
function applies the specified functionName to each item in the specified list and returns a list of the return values.