Apply a callback to an array: Difference between revisions

added Ursala
m (corrected categorization of task)
(added Ursala)
Line 1,068:
a 5 [ 1 + ] map-array
</lang>
 
 
=={{header|Ursala}}==
The * is a built-in map operator.
This example shows a map of the successor function over a list of natural numbers.
<lang Ursala>
#import nat
 
#cast %nL
 
demo = successor* <325,32,67,1,3,7,315>
</lang>
output:
<pre>
<326,33,68,2,4,8,316>
</pre>
 
=={{header|V}}==
Anonymous user