# array:for-each - XPath XQuery Reference

Returns an array whose size is the same as array:size($array), in which
            each member is computed by applying $function to the corresponding member of
            $array.deterministiccontext-independentfocus-independenthigher-orderReturns the result of the expression:
         array:join( (1 to array:size($array)) ! [ $action($array(.)) ] )array:for-each(["A", "B", 1, 2], function($z) {$z instance of xs:integer})[false(), false(), true(), true()]array:for-each(["the cat", "sat", "on the mat"], fn:tokenize#1)[("the", "cat"), "sat", ("on", "the", "mat")]