(Re-sending after adjusting expected from-address.) I am being confused by the amend adverb's behaviour when applied to a verb. http://www.jsoftware.com/help/dictionary/d530v.htm I thought that the output of the verb just supplied some indices, and } then behaved as if applied to that noun, but that seems not to be the case (in j701):
a =: 'abc';:'def' '*' (4:}) a abc d*f This looked odd. I experimented further. I know that '4:' will always return a single 4 (rank 0), but upon substituting that result, I find: '*' (4}) a |index error | '*' (4})a This makes sense, as 4 tries to address the row 4 of the table (and only rows 0 and 1 exist) The behaviour of u} is as if the array is being ravelled, modified using the noun indices, and unravelled. The behaviour matches: ($a)$ '*' (4}) ,a abc d*f Am I misunderstanding the intended nature of u}? The definition in the documentation does not mention this pseudo-ravelling, though the first example illustrates it. How do I avoid it happening? Is it a known bug kept for compatibility; I could find no mention in the archives? Related: is there a conventional way to convert between ravelled and non-ravelled indexes, for a given array shape? I would rather not do it in 20 characters if I could do it in 5. -- src/ ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
