Home › Forums › kdb+ › Updating input parameter over iteration › Re: Updating input parameter over iteration
-
Hey, thanks for the reply.
So I think the above is quite close however it only allows you run sum, not appending to iteration id as required.
Following similar to above:
q)summer1:{[x;y] .m.x:x; x:x+y}q)750 summer1[;2]/2;
q).m.x
1500I’m probably missing something obvious but is there a way to manipulate this to append to ID per iteration so that:
q)summer:{[ID;y;z] y:y+z;.m.id:.m.id,ID;.m.y:y; ID:ID+1}q).m.y
1500 (as above)
q).m.ID
750 (missing piece)
Thanks again!