How many times do you guess the function is recursing the power version (with X0 Y0 initial values for x and y) 10 (bar1 ; bar2 )&>/^:([ > 0 #@{:: ] )^:_ X0 ; Y0 On Friday, January 25, 2019, 11:43:01 p.m. EST, Brian Schott <schott.br...@gmail.com> wrote: I am getting a stack error from code foo like that at the bottom of this post. First of all can I assume the error is due to the recursion? J says the stack error is occurring in the verb bar1 in my code.
If so, is it likely that I (or someone) can circumvent the stack error just by rewriting the verb foo using the Power conjunction ^: with a do while approach based on the N in the if. statement? So, I am not just asking if the power conjunction is possible in this case, but also is there any likelihood that the stack error can be avoided. If not, maybe someone can suggest another workaround. N=: 10 foo =: dyad define x NB. desired final result if. N>#x do. x =. x bar1 y y =. x bar2 y x foo y NB. recursion end. ) -- (B=) <-----my sig Brian Schott ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm