next node: BSTreeMap,
prev node: BSTreeIndex,
up to node: Subsystem Balanced Search Trees


BSTreeReduce

Reduce the elements of a tree by a combining function to a single value.

Signature of BSTreeReduce

List of Import References :
See BOOL
See BSTree
See DENOTATION
See Nat
See Option
See Pair
See Seq
See Tree

 SIGNATURE BSTreeReduce[from, < : from ** from -> bool, to]

$Date: 2010-09-30 18:24:17 +0200 (Do, 30. Sep 2010) $ ($Revision: 616 $)

IMPORT BSTree[from, <] ONLY bstree[from, <]

Parameter

from is the data type of the elements of the tree, from is the result type of the combining function.

SORT from to
FUN < : from ** from -> bool

Reduce

The functions takes the root value and the result of reducing the left and right subtrees respectively. The initial to value is returned for the empty tree.

FUN / :  (from ** to ** to -> to) ** to ** bstree[from, <] -> to

The following functions are more similar to the reduce function on sequences, as the function takes one from and one to value. For remembering the names, keep in mind that (::, <>) /_order t constructs are order traversal of the tree, where order is one of { in, pre or post.

FUN /_pre /_in /_post: (from ** to -> to) ** to ** bstree[from, <] -> to


next node: BSTreeMap,
prev node: BSTreeIndex,
up to node: Subsystem Balanced Search Trees