I have if.1=#e=.,(])`((is&(,@;))/)@.(1<#)([:(a:&~:#])<"1@(w(-.@([e.])#[)w((-.@((i.@#@])e.(([(=i.1:)])"0 1)))#])])@;@((1<#@>)#])@:,"2@((F=.<"1 frc q){]))y do.
I think this could still be valid if one uses an extra dimension without boxing. The agenda's y is a list of boxes. After the empty ones are removed beforehand, one may end up with '', whereupon the 1 gerund gives me an error, so I had to discriminate. is has rank _ _ _, and so does ], but the shape of their results is either '' or <:1 . I'd hope I'm not overlooking something. Jul 26, 2022, 05:51 by elro...@elronnd.net: > Have you ever written code using @., as in u`v @. w, where the ranks of the > results of u and v differ from one another (for a given rank of x/y)? If so, > can you post a self-contained snippet? (Don't worry about being runnable; I > just want to get a general idea of the code patterns.) > > Further stipulations: > > - Should not rely on boxing (incidental use of boxes, eg as record types, is > ok) > > - Equivalent use of explicit control structures or u^:p (for predicate noun > or verb p) is ok > > Also interested in usage of / or folds where the accumulator rank changes > over time (especially if it continues to change after the 1st iteration). > > Thanks! > > -E > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm