TernaryTrees-0.0.1: Efficient pure ternary trees

Data.Set.StringSet

Synopsis

Documentation

data StringSet Source

StringSet is ternary tree. It is commonly used for storing word lists like dictionaries for spell checking etc.

insert :: String -> StringSet -> StringSetSource

Inserts a new list of elements into a tree.

insert' :: String -> StringSetSource

Quickly build an initial tree.

isElem :: String -> StringSet -> BoolSource

Returns true if the string is in the StringSet

treeSize :: StringSet -> IntSource

Returns the number of non-Null Elems

numEntries :: StringSet -> IntSource

Counts how many entries there are in the tree.

fromList :: [String] -> StringSetSource

Creates a new tree from a list of strings