Yes. You could build an "explicit fork adverb", to implement forks in J if J did not already have forks implemented. For example:
forkTemplate=: 0 :0 (u y) (Z) v y : (x u y) (Z) x v y ) fork=: 1 :0 2 :(forkTemplate rplc 'Z';5!:5<'u') ) Example use: +/ %fork # p:i.5 5.6 Thanks, -- Raul On Wed, Aug 12, 2020 at 5:17 PM Don Guinn <[email protected]> wrote: > > > I had always assumed that an adverb with its argument produced a verb, a > > conjunction with one argument produced an adverb and a conjunction with two > > arguments produced a verb. So I was surprised in this thread where an > > adverb produced a noun. So I did a little experimenting and got the > > following test. > > > > av=:1 : 0 > select. m > case. 0 do. 123 NB. Return a noun > case. 1 do. / NB. Return an adverb > case. 2 do. &. NB. Return a conjunction > case. do. + NB. Return a verb > end. > ) > > (0 av) > 123 > > +(1 av)1 2 3 > 6 > > 2+(2 av)^.3 > 6 > > 3(3 av)4 > 7 > > 1000(3 av)(1 av)(0 av) > > > 1123 > > > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
