It would be good to see a useful example and a model implementation so a person could judge the usefulness of this proposal.
It's perhaps also worth noting that you can use negative depths with L: L.L:_1 ((<<2),<<<<<<3) ┌─┬─┐ │1│5│ └─┴─┘ So it might be that the mechanism you propose has already been implemented? Thanks, -- Raul On Thu, Mar 11, 2021 at 1:12 AM Arthur Anger <[email protected]> wrote: > > Now that D. and D:have been freed of derivative duties, I suggest that they > be given tree-depth duties. > > I typically envision trees as bearing leaves at multiple "levels", which are, > however, all labeled as 0 in J. The numbers of Opens needed to access each > of them can be termed their "depths", and that value is more often of use to > me than their J-levels. > > Since we often call these containers "trees", the distance from "root" to > "leaf" would normally be termed "height" (for which H: or h. is available). > I tend to think, instead, of nested boxes as "caverns", or "dungeons", > requiring a specific set of keys (index list) for access to each cell--where > there do, indeed, be Domain Dragons, waiting to pounce on a mixed-type Open. > (It is safest to store only values of compatible type on any given level.) > > By analogy to the "level" verbs, D. and D: could become "Depth" (or > "DepthOf") and "DepthAt" (or "AtDepth"). Since L. and L: are of different > valences, a single symbol could suffice for their purposes--unless someone > has visions for eventual related extensions. The same would be true for > depth or height verbs. > --Art > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
