Map (higher-order function): Difference between revisions

Content deleted Content added
m Generalization: {{code}} {{mvar}}
 
Line 157:
| <code>std::transform(<wbr/>''begin1'', ''end1'', ''begin2'', ''result'', ''func'')</code>
|
| in header {{mono|<algorithm>}}<br /> ''begin'', ''end'', and ''result'' are iterators<br /> result is written starting at ''result''
|
|- valign="top"
Line 217:
|- valign="top"
| [[Groovy (programming language)|Groovy]]
| <{{code>|list.collect(func)</code>|groovy}}
| <{{code>|[list1 list2]<wbr>.transpose()<wbr>.collect(func)</code>|groovy}}
| <{{code>|[list1 list2 ...]<wbr>.transpose()<wbr>.collect(func)</code>|groovy}}
|
|
Line 387:
|- valign="top"
| [[XPath 3]]<br />[[XQuery]] 3
| <{{code>|list ! block</code>|xquery}}<br /> <{{code>|for-each(list, func)</code>|xquery}}
| <{{code>|for-each-pair(list1, list2, func)</code>|xquery}}
|
| In <code>block</code> the context item <code>.</code> holds the current value