1. Tree.e, Progress (Or lack thereof...)

The freaky recursions have been put in the new slice.e, so making yr own tree
has gotten a lot simpler. (This is good, 'cos tree.e is a bit of a kludge)
(Also, recursion is nifty, but not fast (overheads). Gotta work on this.)

--      global function sget(object s, sequence ix)
--      global function tset(object s, sequence ix, object x)
--      global function tapp(object s, sequence ix, object x)
--      global function tdel(object s, sequence ix)

This funk does the seq. index by seq. stuff and will happily work on any other
twisted structures you might make...

Successor and predecessor use preorder! Yuck! Kludge! Lazy of me, but it was so
much simpler to do it that way... (So harrass me! I'm lazy...)

(In the tree I'm assuming as standard, any node may have any number of
children, (no difference between internal nodes/leaves) and all children are
taken to be right-children. (This makes sense for a dir-tree, which I assume to
be the major app.) As a side-effect, preorder (?) and inorder are the same.

I have nicked the inner loop of Jeffrey Fielding's listdirs.ex, to make a small
(kludged) dir-tree demo, called dirt.ex. (Yes, it IS dirty!)

Comments, flames, mailbombs, get-a-life!s gratefully axeppted.

"Me too!"s are disapproved of.

I'll dump the code on you as soon as figure out what to do about the showkey
polymorphism. (rather: lack thereof.)

Anders

-------------------------------------------------------------------
Anders Eurenius <c96aes at cs.umu.se> ICQ UIN:1453793
Computer Science/Engineering student at the university of Umeaa
-------------------------------------------------------------------

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu