Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
- data PseudoTrie t a
- beginsWith :: Eq t => PseudoTrie t a -> t -> Bool
- assign :: Eq t => NonEmpty t -> Maybe a -> PseudoTrie t a -> PseudoTrie t a
- merge :: Eq t => PseudoTrie t a -> PseudoTrie t a -> PseudoTrie t a
- add :: Eq t => NonEmpty t -> PseudoTrie t a -> PseudoTrie t a -> PseudoTrie t a
- toAssocs :: PseudoTrie t a -> [(NonEmpty t, a)]
- fromAssocs :: Eq t => [(NonEmpty t, a)] -> PseudoTrie t a
- lookup :: Eq t => NonEmpty t -> PseudoTrie t a -> Maybe a
- lookupNearestParent :: Eq t => [t] -> PseudoTrie t a -> Maybe a
- areDisjoint :: Eq t => PseudoTrie t a -> PseudoTrie t a -> Bool
- intersectionWith :: Eq t => (a -> b -> c) -> PseudoTrie t a -> PseudoTrie t b -> PseudoTrie t c
- prune :: PseudoTrie t a -> PseudoTrie t a
Documentation
data PseudoTrie t a Source
Non-Empty Rose Tree with explicit emptyness
Functor (PseudoTrie t) | |
Foldable (PseudoTrie t) | Depth first |
(Eq t, Eq a) => Eq (PseudoTrie t a) | |
(Show t, Show a) => Show (PseudoTrie t a) | |
Eq t => Monoid (PseudoTrie t a) | Overwriting instance |
beginsWith :: Eq t => PseudoTrie t a -> t -> Bool Source
assign :: Eq t => NonEmpty t -> Maybe a -> PseudoTrie t a -> PseudoTrie t a Source
Provides a form of deletion by setting a path to Nothing
, but doesn't
cleanup like prune
merge :: Eq t => PseudoTrie t a -> PseudoTrie t a -> PseudoTrie t a Source
Overwrite the LHS point-wise with the RHS's contents
add :: Eq t => NonEmpty t -> PseudoTrie t a -> PseudoTrie t a -> PseudoTrie t a Source
toAssocs :: PseudoTrie t a -> [(NonEmpty t, a)] Source
fromAssocs :: Eq t => [(NonEmpty t, a)] -> PseudoTrie t a Source
lookupNearestParent :: Eq t => [t] -> PseudoTrie t a -> Maybe a Source
areDisjoint :: Eq t => PseudoTrie t a -> PseudoTrie t a -> Bool Source
Simple test on the heads of two tries
intersectionWith :: Eq t => (a -> b -> c) -> PseudoTrie t a -> PseudoTrie t b -> PseudoTrie t c Source
The meet of two PseudoTrie
s
prune :: PseudoTrie t a -> PseudoTrie t a Source
Needless intermediary elements are turned into shortcuts, Nil
's in
subtrees are also removed.