Map
|
This reference topic applies to FQL v4. Go to this page for the latest FQL v10 reference topics. |
Map( array, lambda )
map_( lambda, array )
Map( array, lambda )
Map( array, lambda )
Map( array, lambda )
Map( array, lambda )
Description
The Map function iterates on the provided array, calling the
provided lambda function repeatedly with each item in array, and
returns the results of all invocations in a new array of the same type
(an Array or Page). As Map processes array,
each invocation of the lambda function can see the effects of write
operations from previous invocations.
Examples
The following query has a Lambda which takes one variable x,
adds 1 to its value, and then returns the incremented value. This Lambda
is executed once for each value in the array. These values are 1, 2, 3.
[ 2, 3, 4 ]
[2, 3, 4]
[2 3 4]
Arr(LongV(2), LongV(3), LongV(4))
[2, 3, 4]
[ 2, 3, 4 ]