Module Data.Trie.Internal

Internal representation of a trie.

Author: Lasse Züngel

Version: October 2024

Summary of exported operations:

empty' :: InternalTrie a  Deterministic 
An empty internal trie.
null' :: InternalTrie a -> Bool  Deterministic 
Returns true iff the internal trie is empty.
singleton' :: String -> a -> InternalTrie a  Deterministic 
A singleton internal trie.
insert' :: String -> a -> InternalTrie a -> (Bool,InternalTrie a)  Deterministic 
delete' :: String -> InternalTrie a -> Maybe (InternalTrie a)  Deterministic 
lookup' :: String -> InternalTrie a -> Maybe a  Deterministic 
Looks up a value in the internal trie.
toList' :: InternalTrie a -> [(String,a)]  Deterministic 
Converts an internal trie into a list of key-value pairs.
second :: (a -> b) -> (c,a) -> (c,b)  Deterministic 
Auxiliary functions

Exported datatypes:


InternalTrie

Internal representation of a trie.

Constructors:

  • InternalTrie :: (Maybe a) -> [(Char,InternalTrie a)] -> InternalTrie a

Exported operations:

empty' :: InternalTrie a  Deterministic 

An empty internal trie.

Further infos:
  • solution complete, i.e., able to compute all solutions

null' :: InternalTrie a -> Bool  Deterministic 

Returns true iff the internal trie is empty.

singleton' :: String -> a -> InternalTrie a  Deterministic 

A singleton internal trie.

insert' :: String -> a -> InternalTrie a -> (Bool,InternalTrie a)  Deterministic 

delete' :: String -> InternalTrie a -> Maybe (InternalTrie a)  Deterministic 

lookup' :: String -> InternalTrie a -> Maybe a  Deterministic 

Looks up a value in the internal trie.

toList' :: InternalTrie a -> [(String,a)]  Deterministic 

Converts an internal trie into a list of key-value pairs.

second :: (a -> b) -> (c,a) -> (c,b)  Deterministic 

Auxiliary functions