How I use it quite often is in a hook for sorting by column, e.g. sort by
the first column:
]tab=: 5 3 ?@$ 100
62 32 90
6 38 33
9 60 28
92 29 41
68 83 79
(/: {."1) tab
6 38 33
9 60 28
62 32 90
68 83 79
92 29 41
Of course, you could use any other verb returning #tab elements to be
sorted.
Best regards,
Jan-Pieter.
On Sun, 8 Jan 2023, 15:02 Vanessa McHale, <[email protected]> wrote:
> Hello all,
>
> To my mind, comfort with indexing is one of the differentiating factors
> for array programming vs. functional programming; J has grade as a
> primitive on par with sort.
>
> NuVoc lists /:@/: (rank) and permutation inversion as two uses.
>
> Are there any examples you like that show off grade or perhaps indexing
> ({)?
>
> Cheers,
> Vanessa McHale
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm