RE: Sequence depths please explain
- Posted by Henri.Goffin at sbs.be Mar 29, 2002
- 408 views
Maybe i'm a tiny bit off topic but this may be inspiring. Take a look a this (recursive) function: -------------------------------------------------- global function skeleton(object o) -- if the input is a sequence, the output is a printable representation of the "skeleton" of the sequence -- where the atoms are represented by dots (or whatever you like). ex: {1,2,{3},"four",{5,6}} --> "{..{.}{....}{..}}" sequence skel object skeli if atom(o) then return o end if skel = "" for i = 1 to length(o) do skeli = skeleton(o[i]) if atom(skeli) then skel &= '.' --<--change here if you prefer stars or dashes or... else skel &= skeli end if end for return '{' & skel & '}' end function Henri Goffin