Goto Chapter: Top 1 2 3 4 5 6 7 8 9 Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

9 Trees
 9.1 Trees

9 Trees

The trees are used in ToDoLists. They are a technical feature, and fairly general, so they also can be used somewhere else.

9.1 Trees

9.1-1 IsTree
‣ IsTree( arg )( filter )

Returns: true or false

The category of trees. A tree may have a content, a list of successors, a predecessor and it knows if it is a leave of a tree or not.

9.1-2 Content
‣ Content( arg )( attribute )

Returns: object

The content of the tree. May be any object.

9.1-3 ListOfSuccessors
‣ ListOfSuccessors( arg )( operation )

Returns: a list of trees

Returns the list of successors of a tree.

9.1-4 Predecessor
‣ Predecessor( arg )( operation )

Returns: a tree or fail

Returns the predecessor of a tree, or fail if there is none.

9.1-5 ListOfSentinels
‣ ListOfSentinels( arg )( operation )

Returns: a list

Returns a list of leaves of the tree.

9.1-6 RemoveHead
‣ RemoveHead( arg )( operation )

Returns: a tree

Returns the first successor of the tree, and adds all other successors of the tree to the tree that is returned. If the tree is a leave, it returns an empty tree. If the tree is empty, it returns the tree itself.

9.1-7 Tree
‣ Tree( )( operation )

Returns: a tree

Returns an empty tree.

9.1-8 Tree
‣ Tree( obj )( operation )

Returns: a tree

Returns a tree with argument obj.

9.1-9 Add
‣ Add( tree, new_tree )( operation )

Returns: nothing

Adds the [list of] tree[s] new_tree as successor to the tree tree.

9.1-10 ContentListFromSentinelToHead
‣ ContentListFromSentinelToHead( sent )( operation )

Returns: a list

Returns a list of the contents of the trees from the leave sent up to the content of the head of the tree.

9.1-11 PostOrder
‣ PostOrder( arg )( operation )

Returns: a list

Returns the contents of the nodes of the tree in post-order.

 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 Ind

generated by GAPDoc2HTML