On 2020-06-22 13:33, HH PackRat wrote:
However, if the single m value is surrounded by parentheses (which is
nowhere stated in the amend definition x m} y), then it DOES work:
]s1=. 999 (9) } s
0 1 2 3 4 5 6 7 8 999 10 11
What am I not understanding here? Thanks for any explanations.
You've been answered, but your next question might be
"Wait, then how does } have *three* parameters?"
Consider:
3 (1 }) i.5
0 3 2 3 4
setninth=: 9 }
999 setninth i.10
0 1 2 3 4 5 6 7 8 999
999 setninth -i.10
0 _1 _2 _3 _4 _5 _6 _7 _8 999
So } isn't a verb that modifies arrays, but an adverb that
create array-modifying verbs.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm