I'll take the opportunity to update a more general } specialization that
probably doesn't need its own primitive because it is tacit (except for ar).
ar =: 1 : '5!:1 <''u'''
amend =: [` ([."_ ` ar) `{`] `: 6 ` (]."_) `] }~~
1 amend (2 0 ; 1 1) i. 3 3
0 1 2
3 1 5
1 7 8
there is a fully tacit version of your function. which switches m and x in
order to apply rank to "the normal m" and so copy each result
cdoo =: ]:"_`[`]}("0 _)
(2 0;1 1) 1 cdoo i.3 3
On Wednesday, January 19, 2022, 09:53:23 p.m. EST, Hauke Rehr
<[email protected]> wrote:
mainly @HR
what do you think about
curlyrtcoco =: {{ m x} y }}"0 _
(2 0;1 1) 1 curlyrtcoco i. 3 3
0 1 2
3 4 5
1 7 8
0 1 2
3 1 5
6 7 8
?
Would this be worth adding as a primitive?
I had some use for it, but not all too frequently.
} can be viewed as a three noun argument function,
but you can only change its rank wrt two of them.
That’s why I’d like to have this complementary one, too.
--
----------------------
mail written using NEO
neo-layout.org
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm