Tacit code may often be more concise than explicit code when you are using the same named arguments multiple times.
But that would not happen when you are using a name only once. That said, sequences of monadic verbs do occur in tacit programming. And, you have several options here: There's the ([: v1 v2) y pattern which you mentioned. There's also the v1@:v2 y pattern. And (though it's important here to understand rank issues), there's the v1@v2 y pattern. And, of course, sometimes there's specific alternative phrasings for concepts. I hope this helps, -- Raul On Wed, Aug 4, 2021 at 1:15 PM Thomas Bulka <[email protected]> wrote: > > Hi Forum, > > say, I do have an arbitrary array M: > > M =: 3 4 $ ?~12 > > Now I want to apply some monadic verbs to M, like: > > N =: |: >: *: M > > It seems to me, that the tacit way to combine the verbs |: >: *: makes > heavy use of [:, which makes the tacit form pretty verbose for such a > simple task: > > tv =: [: |: [: >: *: > > Since I seem to stumble above the need to chain some monadic verbs to > process some noun quite often, I wonder what the most idiomatic J-way is to > handle that kind of construct. Is it the tacit form tv from above? Is there > a better tacit form? Would it be the explicit form ev =: 3 : '|: >: *: y'? > Or does it depend on some parameter I don't see yet? > > I'd really like to hear some opinions on this. > > Kind regards, > > Thomas > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
