Steve Wampler wrote:
>
> David Gamey wrote:
> >...
> > In order to do this (use negatives) it would be necessary to
> > determine the 'depth' of a structure. Now this is an interesting
> > thought. We don't have an operator for it. We can determine
> > size easily and generally but depth is different. Values like
> > &null, numerics, strings, etc. have a depth of 1.
>
> I think it might be cleaner to say they have a depth of 0,
> so a structure reference could also be treated as the depth 0
> of the structure and depth 1 would be the values in the list.
>
I had intended that all reference or immutable values had the
same level. I chose 1 simply to save that for the infinite
case. It also allows for extension to the idea of using
negative numbers in copy in a way similar to string and list
indexing, so that a -1 copy depth would copy all but the last
tier of the structure.
On the idea of a general depth operator (e.g. **x) or procedure.
The only small catch would be the depth of a looped structure.
Returning the maximum unlooped depth would probably be the
correct answer.
But as you'd indicated this is a non-novice activity and the
3-tier Godiva approach is clean. Unless there is some general
class of of problem this would open up to there isn't much
opportunity here.
David Gamey
_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/unicon-group