Forum Replies Created

  • mg4

    Member
    May 11, 2022 at 12:00 am in reply to: 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
    1500

     

    I’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!

  • mg4

    Member
    May 11, 2022 at 12:00 am in reply to: Updating input parameter over iteration

    The very one.

    Fair play and thanks!