One can simply use the recursion scope implicit within f. to avoid that kind of issue,
rs=. 1 : 0 u y : x u y ) For example, fac=. 1:`(* $:@:<:)@.* (1 + fac f.) 1 + 1:`(* $:@:<:)@.* (1 + fac f.) 3 22 f. implicitly provides an explicit envelope to dodge the problem, (1 + fac)f. 1 + 1:`(* $:@:<:)@.* (1 : 0) u y : x u y ) (1 + fac)f. 3 7 Similarly, fac=. 1:`(* $:@:<:)@.* rs (1 + fac f.) 1 + 1:`(* $:@:<:)@.* (1 : 0) u y : x u y ) (1 + fac f.) 3 7 (1 + fac)f. 1 + 1:`(* $:@:<:)@.* (1 : 0) (1 : 0) u y : x u y ) u y : x u y ) (1 + fac)f. 3 7 However, "explicit junk" is there which means that there is no easy way currently to fix tacit verbs, with embedded recursive tacit verbs, to produce tacit verbs. The custom j interpreter that I use has a primitive that allows one to provide tacit recursion scope, fac=. 1:`(* $:@:<:)@.* O.0 (1 + fac f.) 3 7 (1 + fac)f. 3 7 Later I realized I could produce illegally tacit adverbs (mRS and dRS are defined in the Wicked Tacit Toolkit which works with the official j807 and some other earlier interpreters) to provide tacit recursion scope to monadic and dyadic tacit verbs. fac=. 1:`(* $:@:<:)@.* mRS (1 + fac f.) 3 7 (1 + fac)f. 3 7 On Wed, Feb 9, 2022 at 2:11 PM Elijah Stone <elro...@elronnd.net> wrote: > > On Wed, 9 Feb 2022, 'Pascal Jasmin' via Programming wrote: > > > Jose/Pepe has done this. afaiu I think it is a way to avoid unnecessary > > intermediate names. > > I was going to ask: how? But then I realised it is completely possible to > define this as-is: > > recur=: 13!:8@21 > scope=: {{ > old_recur=. recur > recur=: u > r=. u y > recur=: old_recur > r }} > > Season with try. and ambivalence to taste. > > (That said, you cannot retain the old behaviour of $: in cases where you > have not explicitly specified a scope.) > > -E > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm