[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LISP Tree Functions

I am currently working on a project in school that is going to require the
use of trees in LISP.  I am VERY new to LISP and would appreciate any help
on the following functions as I do not want to have to "re-invent the wheel."

I need basic tree functions that will:

	Return the height of a tree (given the tree)
	Return all the leaves of a tree (given the tree)
	Return all the Children of a given node (given the node and tree)
	Return whether or not the given argument is a tree (given a tree)
	Return the descendants of a node (given the node and tree)

Note that the only difference between Children and Descendants is that
	Children only returns one level down and Descendant returns all
	levels below the given node.

Any help is appreciated.  I would really like the straight (defun ...)
statements if someone had already written them, but if the source code
isn't out there then suggestions would be great!

Thanks in advance!  

P.S.  Please send all replies via Email to: