TernaryTrees-0.1.0.0: Efficient pure ternary tree Sets and Maps

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.

Instances

Eq StringSet 
Show StringSet 
Binary StringSet

A rather long Binary instance, that uses binary numbers to indicate where SEnds are efficiently.

insert :: String -> StringSet -> StringSetSource

Inserts a new list of elements into a tree.

singleton :: String -> StringSetSource

Quickly build an initial tree.

member :: String -> StringSet -> BoolSource

Returns true if the string is in the StringSet

size :: StringSet -> IntSource

Counts how many entries there are in the tree.

fromList :: [String] -> StringSetSource

Creates a new tree from a list of strings