MarkLogic Server 11.0 Product Documentation
fn:map

fn:map(
   $function as function(item()) as item()*,
   $seq as item()*
) as item()*

Summary

Applies the function item $function to every item from the sequence $seq in turn, returning the concatenation of the resulting sequences in order. For more details, see XPath 3.0 Functions and Operators.

Parameters
function The function value.
seq The function value.

Example

fn:map(function($a) { $a * 2 }, (1 to 10))
=> (2, 4, 6, 8, 10, 12, 14, 16, 18, 20)
Powered by MarkLogic Server | Terms of Use | Privacy Policy