I use the following adverb, filter=. &> (#~`) (`:6)
(>&6) filter 2+i.9 7 8 9 10 ((2&|)*.(>&6)) filter 2+i.9 7 9 It is slightly more complicated than expected because it can also deal with boxed lists, palindrome=. -: |. palindrome filter 'rats live on no evil star' ; 'blessed are they that believe that they are blessed' ┌─────────────────────────┐ │rats live on no evil star│ └─────────────────────────┘ palindrome filter 'rats live on no evil star' (,&<)&;: 'blessed are they that believe that they are blessed' ┌─────────────────────────────────────────────────────┐ │┌───────┬───┬────┬────┬───────┬────┬────┬───┬───────┐│ ││blessed│are│they│that│believe│that│they│are│blessed││ │└───────┴───┴────┴────┴───────┴────┴────┴───┴───────┘│ └─────────────────────────────────────────────────────┘ I hope it helps. On Tue, Apr 30, 2019 at 9:08 AM 'Pascal Jasmin' via Programming < [email protected]> wrote: > > > (#~ >&6) (2+i.9) > > 7 8 9 10 > > > > > On Tuesday, April 30, 2019, 9:06:26 a.m. EDT, JmageK <[email protected]> > wrote: > > > > > > NB. Want it to return all numbers larger than 6 from list > > (>&6) (2+i.9) > NB. Actual result 0 0 0 0 0 1 1 1 1 > NB. desired result 7 8 9 10 > > > I searched but could not find what to do next to have it return only those > numbers which pass the comparison (1 1 1 ). > > JmageK > -- > Securely sent with Tutanota > ---------------------------------------------------------------------- > 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
