Task

Take a combined set of elements and apply a function to each element.




( array count function -- )
{
  value| array fn |
  [ i array ] is I
  [ to fn swap to array 0 swap [ I array.get :stack fn invoke I array.put ] countedLoop ]
} is map-array
 
( Build an array )
5 cells is-array a
10 0 a array.put
11 1 a array.put
12 2 a array.put
13 3 a array.put
14 4 a array.put
 
( Add 1 to each item in the array )
a 5  [ 1 + ] map-array