map

Description

Applies a lambda function to every element in a list.

list map( list input , lambda definition )

Evaluate a lambda for each element of input, transforming the elements in the list.

Examples

 {map([1, 2, 3, 4, 5], lambda x: x*2)} ---> [2, 4, 6, 8, 10]

You cannot modify the length of the input array within the lambda. For example, the following code would result in an error:

{numbers = [1,2,3]}
{map(numbers, lambda n: push('numbers', n))}
Top