0 1 2 3 4]\1 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 2 0 0 0 3 0 0 0 0 0 0 0
1 2 0 0 2 3 0 0 0 0 0 0 0 0 0 0 1 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4<\1 2 3 ┌─────┬───┬─┬┐ │ │ │ ││ ├─────┼───┼─┼┤ │1 │2 │3││ ├─────┼───┼─┼┤ │1 2 │2 3│ ││ ├─────┼───┼─┼┤ │1 2 3│ │ ││ ├─────┼───┼─┼┤ │ │ │ ││ └─────┴───┴─┴┘ On Mon, Feb 19, 2018 at 2:38 PM, Skip Cave <s...@caveconsulting.com> wrote: > Thanks to all the informative responses. I knew there had to be a way to > use \ for the sliding window, but > it didn't occur to me to use ] to access the right argument. > > so > > ]\1 2 3 > > 1 0 0 > > 1 2 0 > > 1 2 3 > > but > > 1 2 3\1 2 3 > > |domain error > > | 1 2 3 \1 2 3 > > I thought that ] replicated the right argument, but appaently not. > > Why does the first example work, and the second doesn't? > What exactly is the ] doing in the first example? > > Skip > > > Skip Cave > Cave Consulting LLC > > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm