[Jprogramming] How m"n shoulda been defined
Marshall Lochbaum
mwlochbaum at gmail.com
Sun Aug 9 20:00:41 UTC 2015
I've used (0"0) a few times to make an empty array a given shape
(usually followed by an invocation of }). However, (0$~$) is not much
longer and I find that it better explains what I am trying to do.
Marshall
On Sun, Aug 09, 2015 at 02:45:11PM -0400, Raul Miller wrote:
> Conciseness?
>
> I guess it's debatable whether constants with non-infinite rank are
> more or less common than gerunds which need to conform to the shape of
> their (eventual) verb argument.
>
> Perhaps it would be worthwhile collecting useful examples of each? I
> know I've used low-rank constants within the last few years, but at
> the moment I do not remember where...
>
> Thanks,
>
> --
> Raul
>
>
> On Sun, Aug 9, 2015 at 2:03 PM, Jose Mario Quintana
> <jose.mario.quintana at gmail.com> wrote:
> > A constant verb (with rank _) can be produced easily via &[. For example,
> >
> > (1 2 3 &[) _
> > 1 2 3
> >
> > and it could be followed by a suitable rank (") form if necessary. Am I
> > missing something?
> >
> >
> > On Sun, Aug 9, 2015 at 9:20 AM, Henry Rich <HenryHRich at nc.rr.com> wrote:
> >
> >> All the partitioning modifiers (\ /. \. ;. etc) allow u to be a gerund
> >> that is applied cyclically to the partitions. Thus, +`-/. applies + and -
> >> alternately.
> >>
> >> All the modifiers, that is, except one. The simplest one. One that
> >> perhaps wasn't thought of as partitioning, though it clearly does. It
> >> partitions the y argument into cells.
> >>
> >> If m"n had been defined consistently with the other partitioning
> >> modifiers, we would be able to write +`-"_1 to have different verbs applied
> >> to items. This would have saved dozens of emails over the years searching
> >> for a good way to perform this often-needed operation.
> >>
> >> The constant-verb would have to move somewhere else: m&n, m at n, and many
> >> other places are free.
> >>
> >> For the next language.
> >>
> >> Henry Rich
> >> ----------------------------------------------------------------------
> >> 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
More information about the Programming
mailing list