Apply a callback to an array: Difference between revisions

Content added Content deleted
No edit summary
Line 2,313: Line 2,313:
x = x*x
x = x*x
next
next
</lang>
<lang ring>
Func Main
list = 1:10
each(list, func x {
x = x*x
see x + nl
})
see list

Func each aList, cFunc
for x in aList
_x = x
call cfunc(_x)
next
</lang>
</lang>