Steven Taylor wrote:
> get count, get max count of each boxed list.
> Prebuild filled array. Utilise special code
> form of ammend
Yes, that's how I normally handle this kind of situation. EG, I might
write:
openF =. (&,:) (@:>) ($&1...@$&>`) }
or, if I were in an editorial mood:
openF =. ("_) (`,:) (`>) (`:6) (($ $ 1:)&>`) }
in either case,
_. openF (i.3);(i.5);(i.7)
0 1 2 _. _. _. _.
0 1 2 3 4 _. _.
0 1 2 3 4 5 6
The concept is the same as you outlined: you figure out where the fills will
be, then use that as an amend mask between your input and an array of
(custom fills). And it's not as complex as you might expect: you know how
to figure out where the fills will be? You use open, of course :)
-Dan
PS: Not to be used in performance-critical situations.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm