Functions

map

Supported By

Syntax

the map of ( list , functionName )

map ( list , functionName )

List yields a list. FunctionName yields the name of a function.

Example

put map((1,4,9,16,25), "sqrt") -- prints 1,2,3,4,5

Description

The map function applies the specified functionName to each item in the specified list and returns a list of the return values.

See Also

filter, reduce