Apply a callback to an array: Difference between revisions

Line 1,636:
Print a ' 1 16 81 256 625
Print ' send a CR
</lang>
 
Compact code, setting start and end values to iterator M
<lang M2000 Interpreter>
Def Foo(x)=x**2
A=(1,2,3,4,5)
M=Each(A, 2 , -2) ' from 2nd from start to 2nd from end
While M {
Print Foo(Foo(Array(m))),
}
Print
</lang>
 
Anonymous user