Up |
forTab is a for-like from any array. This is a polymorphic function.
fun [fun [u0 I] u1 tab u0] I
Return : I 0 if no error occurs during the loop, else nil
IMPORTANT : if function returns nil, the loop stops, similar at a 'break' instruction.
typeof myTab = tab I;;
fun fDisplayTab (item)=
_fooId item;; // 1 3 5 7 9
fun main ()=
_showconsole;
set myTab = tabRange 1 5 2; // tabRange creates an integer array (tab) from an initial value, a size and an incremention value
forTab @fDisplayTab myTab;
0;;
Note : if you need more arguments to 'fDisplayList', you can use mkfunX function(s) or use global(s) variable(s).