Thanks.
The second solution (preferably in the simpler form 1 ((<"0@,.~ i.@#) {:: ] ) y 
) would be admissible for large y, but probably the performance would be poor. 


R.E. Boss


-----Original Message-----
From: Programming <[email protected]> On Behalf Of Igor 
Zhuravlov
Sent: maandag 20 juli 2020 03:51
To: [email protected]
Subject: Re: [Jprogramming] from vs fetch

   NB. x {:: y
   ((0 ; 1) , (1 ; 1) ,: (2 ; 1)) {:: y
2 4 6
   NB. io foo y
   1 (((,. <)~ <"0@i.@#) {:: ]) y
2 4 6

Inspired by the last section "To select subarray" in "Common uses" of 
https://code.jsoftware.com/wiki/Vocabulary/curlylfcoco#dyadic

--
Regards
Igor


On Sun, Jul 19, 2020 at 7:18 R.E. Boss wrote:
> [...]
>    ]y =. 1 2;3 4;5 6 7
> ┌───┬───┬─────┐
> │1 2│3 4│5 6 7│
> └───┴───┴─────┘
>   x foo y     
> 2 4 6
> [...]
----------------------------------------------------------------------
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