[Jprogramming] from vs fetch

R.E. Boss r.e.boss at outlook.com
Mon Jul 20 10:24:34 UTC 2020


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 <programming-bounces at forums.jsoftware.com> On Behalf Of Igor Zhuravlov
Sent: maandag 20 juli 2020 03:51
To: programming at jsoftware.com
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 at 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


More information about the Programming mailing list