Anonymous user
Apply a callback to an array: Difference between revisions
m
→{{header|Babel}}: Updated to interactive-mode syntax
No edit summary |
m (→{{header|Babel}}: Updated to interactive-mode syntax) |
||
Line 261:
=={{header|Babel}}==
Let us define a squaring operator:
<lang babel>
Now, we apply the sq operator over a list and display the result using the lsnum utility:
<lang babel>( 0 1 1 2 3 5 8 13 21 34 ) { sq ! } over ! lsnum !</lang>
{{Out}}
<pre>( 0 1 1
=={{header|BBC BASIC}}==
|