Meino

Once you have a working explicit definition,

   myfn=: 4 : 'y #~ (0=x|y)'    NB. 4 for dyadic def
   3 myfn 3 5 6
3 6

the interpreter can help you get the tacit form with 13 : def

   myfn=: 13 : 'y #~ (0=x|y)'
   myfn
] #~ 0 = |

~ Gilles

Le 2022-07-07 à 10:57, 'robert therriault' via Programming a écrit :
Hi Meino,

Since forks can be extended into trains, the extra parenthesis around 0=| are 
not required in the solution.
3 (] #~ (0=|)) 2 5 6 7 9 11 12
6 9 12

     3 (] #~ 0=|) 2 5 6 7 9 11 12
6 9 12

Cheers, bob

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to