TernaryTrees-0.1.3.4: Efficient pure ternary tree Sets and Maps

Data.Map.TernaryMap.Internal

Synopsis

Documentation

data TernaryMap k v Source

TernaryMap k v is ternary tree. It is commonly used for storing word lists like dictionaries.

Constructors

Node !k !(TernaryMap k v) !(TernaryMap k v) !(TernaryMap k v)

Nodes contain key elements only

Null v !(TernaryMap k v)

Null nodes contain the value pointed to by the key list

End

An empty tree

Instances

Functor (TernaryMap k) 
(Eq k, Eq v) => Eq (TernaryMap k v) 
(Show k, Show v) => Show (TernaryMap k v) 
(Binary k, Binary v) => Binary (TernaryMap k v)

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