Changes

Jump to navigation Jump to search
3 bytes added ,  17:26, 9 March 2023
no edit summary
| width='120' | '''Signature'''
|<pre>array:size(
$input array as array(*)
) as xs:integer</pre>
|- valign="top"
| width='120' | '''Signature'''
|<pre>array:append(
$array as array(*), $member add as item()*
) as array(*)</pre>
|- valign="top"
| '''Summary'''
| Returns a copy of {{Code|$array}} with a new the items of {{Code|$memberadd}} attachedas new member.
|- valign="top"
| '''Examples'''
| width='120' | '''Signature'''
|<pre>array:for-each(
$array as array(*), $function action as function(item()*)
) as array(*)</pre>
|- valign="top"
| '''Summary'''
| Returns a new array, in which each member is computed by applying {{Code|$functionaction}} to the corresponding member of {{Code|$array}}.
|- valign="top"
| '''Examples'''
| width='120' | '''Signature'''
|<pre>array:filter(
$array as array(*), $function predicate as function(item()*)as xs:boolean
) as array(*)</pre>
|- valign="top"
| '''Summary'''
| Returns a new array with those members of {{Code|$array}} for which {{Code|$functionpredicate}} returns {{Code|true}}.
|- valign="top"
| '''Examples'''
| width='120' | '''Signature'''
|<pre>array:fold-left(
$array as array(*), $zero as item()*, $function action as function(item()*, item()*) as item()*
) as item()*</pre>
|- valign="top"
| '''Summary'''
| Evaluates the supplied {{Code|$functionaction}} cumulatively on successive members of the supplied {{Code|$array}} from left to right , and using uses {{Code|$zero}} as first argument.
|- valign="top"
| '''Examples'''
| width='120' | '''Signature'''
|<pre>array:fold-right(
$array as array(*), $zero as item()*, $function action as function(item()*, item()*) as item()*
) as item()*</pre>
|- valign="top"
| '''Summary'''
| Evaluates the supplied {{Code|$functionaction}} cumulatively on successive members of the supplied {{Code|$array}} from right to left , and using uses {{Code|$zero}} as first argument.
|- valign="top"
| '''Examples'''
| width='120' | '''Signature'''
|<pre>array:for-each-pair(
$array1 as array(*), $array2 as array(*), $function action as function(item()*)
) as array(*)</pre>
|- valign="top"
| '''Summary'''
| Returns a new array obtained by evaluating the supplied {{Code|$functionaction}} for each pair of members at the same position in {{Code|$array1}} and {{Code|$array2}}.
|- valign="top"
| '''Examples'''
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu