Stability | experimental |
---|---|
Maintainer | ekmett@gmail.com |
Safe Haskell | None |
- class (Adjustable (BaseTrie a), TraversableWithKey1 (BaseTrie a), Representable (BaseTrie a)) => HasTrie a where
- mup :: HasTrie t => (b -> c) -> (t -> b) -> t -> c
- memo :: HasTrie t => (t -> a) -> t -> a
- memo2 :: (HasTrie s, HasTrie t) => (s -> t -> a) -> s -> t -> a
- memo3 :: (HasTrie r, HasTrie s, HasTrie t) => (r -> s -> t -> a) -> r -> s -> t -> a
- inTrie :: (HasTrie a, HasTrie c) => ((a -> b) -> c -> d) -> (a :->: b) -> c :->: d
- inTrie2 :: (HasTrie a, HasTrie c, HasTrie e) => ((a -> b) -> (c -> d) -> e -> f) -> (a :->: b) -> (c :->: d) -> e :->: f
- inTrie3 :: (HasTrie a, HasTrie c, HasTrie e, HasTrie g) => ((a -> b) -> (c -> d) -> (e -> f) -> g -> h) -> (a :->: b) -> (c :->: d) -> (e :->: f) -> g :->: h
- trie :: HasTrie t => (t -> a) -> t :->: a
- untrie :: HasTrie t => (t :->: a) -> t -> a
- newtype a :->: b = Trie {}
- data Entry a b = Entry a b
Representations of polynomial functors
class (Adjustable (BaseTrie a), TraversableWithKey1 (BaseTrie a), Representable (BaseTrie a)) => HasTrie a whereSource
Memoizing functions
mup :: HasTrie t => (b -> c) -> (t -> b) -> t -> cSource
Lift a memoizer to work with one more argument.
memo2 :: (HasTrie s, HasTrie t) => (s -> t -> a) -> s -> t -> aSource
Memoize a binary function, on its first argument and then on its second. Take care to exploit any partial evaluation.
memo3 :: (HasTrie r, HasTrie s, HasTrie t) => (r -> s -> t -> a) -> r -> s -> t -> aSource
Memoize a ternary function on successive arguments. Take care to exploit any partial evaluation.
inTrie :: (HasTrie a, HasTrie c) => ((a -> b) -> c -> d) -> (a :->: b) -> c :->: dSource
Apply a unary function inside of a tabulate
inTrie2 :: (HasTrie a, HasTrie c, HasTrie e) => ((a -> b) -> (c -> d) -> e -> f) -> (a :->: b) -> (c :->: d) -> e :->: fSource
Apply a binary function inside of a tabulate
inTrie3 :: (HasTrie a, HasTrie c, HasTrie e, HasTrie g) => ((a -> b) -> (c -> d) -> (e -> f) -> g -> h) -> (a :->: b) -> (c :->: d) -> (e :->: f) -> g :->: hSource
Apply a ternary function inside of a tabulate