depp:{[i] {i+:1}/[{i~0};0]; :i}
depp[0] / results in error 'i
although I is defined.
Please exuse but the function is useless but I am using it to illustrate I cant put converge inside the function. If you pull the stmts outside, then it works.
depp:{[i] {i+:1}/[{i~0};0]; :i}
depp[0] / results in error 'i
although I is defined.
Please exuse but the function is useless but I am using it to illustrate I cant put converge inside the function. If you pull the stmts outside, then it works.
{[i] {i+:1}/[{i~0} ;0]; :i}
i is unknown in that bit +: applies to global. You can either init i before running depp or use :: within the function to set the global if its not already set