missing line break, sorry
 M =: @] 
v2c =: 1 : '[. u ].'

tine =: 1 : ' (M~) (u v2c) M '

    On Thursday, January 5, 2023 at 07:32:34 p.m. EST, 'Pascal Jasmin' via 
Programming <programm...@jsoftware.com> wrote:  
 
   M =: @]v2c =: 1 : '[. u ].'

tine =: 1 : ' (M~) (u v2c) M '
there was a recent change to allow gerund argument to &.
& and &: could allow gerund v such that w&(u`v)  is (u@[ w v@]).  But tine as 
written is easier to use (only one function.  no parenthesizing gerund 
arguments).



    On Thursday, January 5, 2023 at 06:03:33 p.m. EST, Raul Miller 
<rauldmil...@gmail.com> wrote:  
 
 Sometimes it seems like it would be nice to have a variation on fork
where instead of (f g h) we get *f@[ g h@])

And, of course, we can do that manually. (Also, I forget the contexts
where I have wanted to use this. Maybe I'll remember later. I also
have a vague memory of someone else asking for something like this.)

Anyways, it's fairly straightforward to implement, though perhaps a
bit tough to read (since mostly we don't mess with this kind of
thing):

tine=: 1 :0
  2 :('u@[ (',(5!:5<'u'),') v@]')
)

  (i.2 3) $ $tine , p:i.3 2
2  3  5
7 11 13

FYI,

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

Reply via email to