Elijah replied to the error already Viktor, but for (i.3) on left and right, you could also consider this as a hook: (|."0 _ ]) i.3 NB. (f g) b <==> b f g b 0 1 2 1 2 0 2 0 1
Or as f~ |."0 _~ i.3 0 1 2 1 2 0 2 0 1 HTH, Rob > On 1 Jun 2023, at 11:39 am, Elijah Stone <elro...@elronnd.net> wrote: > > need parentheses > > ((i.3) & |."(0 _) ]) i.3 > |length error, executing dyad 0 1 2&|. > | ((i.3)&|."(0 _)])i.3 > ((i.3) & (|."(0 _) ])) i.3 > 0 1 2 > 1 2 0 > 2 0 1 > > (i.3) & |."(0 _) is ((i.3) & |.)"(0 _) > > On Thu, 1 Jun 2023, 'Viktor Grigorov' via Programming wrote: > >> Hello, >> >> I'm getting 'length error, executing monad (i.x)&|' for >> ((i.3) & |."(0 _) ]) i.3 >> >> but not for >> (i.3) ([ |."(0 _) ]) i.3 >> >> Why is that? Other primitive dyads work in rotate's place. Current nuvoc >> page on rotate has nothing relevant. I well may be be missing something >> obvious. >> ---------------------------------------------------------------------- >> 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