-
Updating input parameter over iteration
Hi,
I was wondering if there’s a way to run a function over x number of iterations and also update a second value based on the function’s output.
For e.g.
summer:{[ID;y;z] y:y+z; ID:ID+1}
{summer[x;y;z]}[;2;2]/[{x<750};0]Currently this runs for 750 iterations however y and z are set to 2 on input so y always equals 4, I have checked this using namespaces.
Is there a way to include another over somewhere so that y will run like 2+2=4, 4+2=6… for 750 iterations?
Any help appreciated!!
PS. The code is being used within peach, that’s why I can’t just use namespaces or a global variable to upsert into.
Log in to reply.