Group,
I've put out an Icon solution to the tree traversal task
(ok, I used Unicon, but it works fine with Icon also):
http://rosettacode.org/wiki/Tree_traversal#Icon
I wasn't sure how to link Unicon back to the Icon entry -
would someone who knows how either teach me or fix it?
Also, I thought about writing the main as:
procedure main()
bTree := [1, [2, [4, 7], 5], [3, [6, 8, 9]]]
every f := (preorder | inorder | postorder | levelorder) do {
writes(image(f),":\t")
every writes(" ",f(bTree))
write()
}
end
to show off Icon/Unicon more, but decided against it in the end.
I could be talked out of that decision easily enough but am not
sure the above adds anything to the task at hand.
Thanks!
Steve
--
Steve Wampler -- [email protected]
The gods that smiled on your birth are now laughing out loud.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Unicon-group mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unicon-group