---David Vincent-Jones wrote:
> I am having problems correctly replacing in this context:
> abc =:i.2 2 3
> [c=: 2{ "1 abc
> 2 5
> 8 11
> c2=:c*2
> Now, how do I get c2 to replace c? (with some elegance)
> I do have a very ugly workaround that I dare not show.
If you're having the same problems I know I used to have (and sometimes still
do!) then it's probably a question of getting the rank of } correct.
c2 2}"0 1 abc NB. x m}y
0 1 4
3 4 10
6 7 16
9 10 22
(+: 2{"1 abc) 2}"0 1 abc NB. x m}y
0 1 4
3 4 10
6 7 16
9 10 22
2 (+:@{"1`2:`])}"1 abc NB. Gerund form
2 (+:@{"1`[`])}"1 abc NB. Gerund form
0 1 4
3 4 10
6 7 16
9 10 22
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm