Apply a callback to an array: Difference between revisions
Content added Content deleted
Line 3,093: | Line 3,093: | ||
} |
} |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
=={{header|RPL}}== |
|||
{{works with|Halcyon Calc|4.2.7}} |
|||
≪ → array func |
|||
≪ array 0 CON |
|||
1 array SIZE FOR j |
|||
j array j GET func EVAL PUT |
|||
NEXT |
|||
≫ ≫ |
|||
´MAP’ STO |
|||
[1,2,3,4,5,6,7,8,9] ≪ SQ ≫ MAP |
|||
{{out}} |
|||
<pre> |
|||
1: [ 1 4 9 16 25 36 49 64 81 100 ] |
|||
</pre> |
|||
=={{header|Ruby}}== |
=={{header|Ruby}}== |