1j1# data
a b r a c a d a b r a

On Sat, Feb 1, 2020, 9:46 AM David Lambert <[email protected]> wrote:

>    data=:'abracadabra'
>
>    NB. whereas
>    1j_2 # data
> |domain error
> |   1j_2    #data
>
>    NB. I've often wanted
>    _2 |. 1j2 # data
>   a  b  r  a  c  a  d  a  b  r  a
>
>    NB. because it aligns with
>
>    3 ": i.~ data                      NB. index from left
>   0  1  2  0  4  0  6  0  1  2  0
>
>    3 ": i:~ data                      NB. index from right
>  10  8  9 10  4 10  6 10  8  9 10
>
>    duplicate =: (i: ~: i.)~
>    duplicate data
> 1 1 1 1 0 1 0 1 1 1 1
> ----------------------------------------------------------------------
> 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