KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ How to make two referencing sub-projection works? Re: How to make two referencing sub-projection works?

  • kshepherd

    Member
    July 29, 2022 at 12:00 am
    f:{[xF] 
        g:{[h;xG] $[xG < 0; xG; h[.z.s; xG - 2] + 20]}; 
        h:{[g;xH] $[xH < 0; xH; g[.z.s; xH - 3] + 30]}; 
        g[h; xF] }; 
    f[10];

    Another option is to use .z.s to refer to the calling function when calling the other function.