chatty-utils-0.7.3.4: Some utilities every serious chatty-based application may need.
Data.Chatty.Focus
Description
Provides an unbalanced BST with a focus on the root.
Synopsis
data Focus a Source #
An unbalanced BST with a focus on the root.
Instances
Methods
anyBstInsert :: i -> Focus i -> Focus i Source #
anyBstRemove :: o -> Focus i -> Focus i Source #
anyBstMax :: Focus i -> Maybe i Source #
anyBstMin :: Focus i -> Maybe i Source #
anyBstLookup :: o -> Focus i -> Maybe v Source #
anyBstEmpty :: Focus i Source #
anyBstHead :: Focus i -> Maybe i Source #
anyBstInorder :: Focus i -> [i] Source #
none :: Focus a Source #
focusSelect :: Indexable a o v => o -> Focus a -> Maybe (Focus a) Source #
Rotate the tree such that the given element becomes the root node.