a couple of useful definitions for doing amends,
amV =: (0 {:: [)`(1 {:: [)`]}
amdt =: 2 : '(u (v"_@:]{ ]))`(v"_@:])`]} ]'
(amV~ 2 4 ,&< 0 2"_ ) 3 2 $ 0
2 4
0 0
2 4
reduce =: 1 : '<"_1@[ ([: u &.>/(>@:) ,) <@:]'
(amV reduce~ 2 4 (;"0) 0 2"_ ) 3 2 $ 0
2 2
0 0
4 4
2 4"_ amdt (0 2) 3 2 $ 0
2 4
0 0
2 4
>:@] amdt (0 2) 3 2 $ 1
2 2
1 1
2 2
________________________________
From: Don Guinn <[email protected]>
To: Programming forum <[email protected]>
Sent: Tuesday, December 27, 2016 3:06 PM
Subject: Re: [Jprogramming] u} vs m}
Just played with the original expression a little and got:
2 4 (0 2"_)}3 2$0
2 0
4 0
0 0
2 4 (0 3"_)}3 2$0
2 0
0 4
0 0
2 4 (0 4"_)}3 2$0
2 0
0 0
4 0
2 4 (0 5"_)}3 2$0
2 0
0 0
0 4
2 4 (0 6"_)}3 2$0
|index error
| 2 4 (0 6"_)}3 2$0
2 4 (0 _1"_)}3 2$0
2 0
0 0
0 4
On Tue, Dec 27, 2016 at 12:31 PM, Raul Miller <[email protected]> wrote:
> The verb form is different from the gerund form, for whatever reasons.
> But this is documented in the dictionary (and in NuVoc, like Henry
> mentioned earlier).
>
> I'm not sure what other answer can be given, other than going into
> detailed explanations of how they are different, and/or why both forms
> are useful. Or, perhaps, if we need "moral justification", we could go
> into examples of quirks in other programming languages (but all
> programming languages have quirks - they seem to be unavoidable - so
> that might be boring).
>
> --
> Raul
>
>
> On Tue, Dec 27, 2016 at 2:20 PM, Brian Schott <[email protected]>
> wrote:
> > This is what the OP needed, I think.
> > Except that instead of the u} form this is the gerund form.
> > So I don't think it is the answer, either.
> >
> > 2 4 [`(0 1"_)`]} 3 2$0
> > 2 4
> > 2 4
> > 0 0
> >
> >
> > On Tue, Dec 27, 2016 at 2:09 PM, Henry Rich <[email protected]>
> wrote:
> >
> >> I have removed the deprecation - it was my misunderstanding of something
> >> Roger wrote.
> >>
> >> The gerund form would be, in simplest form,
> >>
> >> 2 4 [`0:`]} 3 2$0
> >>
> >> --
> > (B=)
> > ----------------------------------------------------------------------
> > 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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm