You could try Infix … here with NuVoc link…
https://code.jsoftware.com/wiki/Vocabulary/bslash#dyadic
x u\ y where x is eg _2 means apply very b to successive pairs (_ for
non-overlapping).
_2 ]\ 1 2 3 4 5 6
1 2
3 4
5 6
_2 ]\ 1 2 3 4 5 6 7
1 2
3 4
5 6
7 0
_2 <\ 1 2 3 4 5 6
┌───┬───┬───┐
│1 2│3 4│5 6│
└───┴───┴───┘
HTH…/Rob
> On 17 May 2020, at 12:42 am, Raoul Schorer <[email protected]> wrote:
>
> Hello,
>
> I am convinced that this must be trivial, but I wasn't able to find in the
> documentation how to reshape a list to a table without manually extracting
> the length.
>
> in summary, is there a more direct way of doing:
>
> lst =. i. 6
>
> ((2,~2%~#) $ ]) lst
>
> for a list of arbitrary length?
>
> Thanks!
>
> Raoul
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm