Alternatively, if the chain gets long, one can use an adverb (a modification of an adverb by Dan Bron) to produce a tacit verb based on @: as Elijah suggested,
pipe=. ([ , (,<'@:') , ])/ strand =: 2 : ' if. ([:`'''') -: u`'''' do. (pipe n)`:6 else. strand (u`n) end.' At =: strand '' [: a4 u3 u2 u1 u0 At NB. [: is used just as a delimiter a4@:u3@:u2@:u1@:u0 [:-+/|:>:*:At -@:(+/)@:|:@:>:@:*: One could even write At tacitly, without much difficulty, in previous versions of the interpreter, now... On Wed, Aug 4, 2021 at 3:50 PM Jan-Pieter Jacobs <[email protected]> wrote: > If a verb is needed, one could easily make an explicit verb out of it as > well: > > v1=: 3 :'|:>:*:y' > > or > > v2=: {{|:>:*:y}} NB. in J902 and onwards > > I can imagine that this could be a lot shorter than a tacit version if the > chain gets long. > > Best regards, > Jan-Pieter > > > > > On Wed, Aug 4, 2021, 20:33 Thomas Bulka <[email protected]> wrote: > > > Am Mi., 4. Aug. 2021 um 19:31 Uhr schrieb Raul Miller < > > [email protected] > > >: > > > > > 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. > > > > > > > Hi Raul, > > > > though this is obviously true, I never thought about it like that before. > > In any case, I'll try to take it as a rule of thumb. > > > > Regards, > > > > Thomas > > > > PS. @Elijah: Thanks very much for your input, too! > > ---------------------------------------------------------------------- > > 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
