Copyright | (c) Eric Mertens 2021 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Re-exported MemoTrie operations and extended arity memoization.
Synopsis
- class HasTrie a
- 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
- memo4 :: (HasTrie a, HasTrie b, HasTrie c, HasTrie d) => (a -> b -> c -> d -> e) -> a -> b -> c -> d -> e
- memo5 :: (HasTrie a, HasTrie b, HasTrie c, HasTrie d, HasTrie e) => (a -> b -> c -> d -> e -> f) -> a -> b -> c -> d -> e -> f
- memo6 :: (HasTrie a, HasTrie b, HasTrie c, HasTrie d, HasTrie e, HasTrie f) => (a -> b -> c -> d -> e -> f -> g) -> a -> b -> c -> d -> e -> f -> g
Documentation
Mapping from all elements of a
to the results of some function
Instances
HasTrie Coord Source # | |||||
HasTrie SmallSet Source # | |||||
HasTrie Void | |||||
HasTrie Int16 | |||||
HasTrie Int32 | |||||
HasTrie Int64 | |||||
HasTrie Int8 | |||||
HasTrie Word16 | |||||
HasTrie Word32 | |||||
HasTrie Word64 | |||||
HasTrie Word8 | |||||
HasTrie Integer | |||||
HasTrie () | |||||
HasTrie Bool | |||||
HasTrie Char | |||||
HasTrie Int | |||||
HasTrie Word | |||||
HasTrie a => HasTrie (Maybe a) | |||||
HasTrie x => HasTrie [x] | |||||
(HasTrie a, HasTrie b) => HasTrie (Either a b) | |||||
HasTrie (U1 x) | just like | ||||
HasTrie (V1 x) | just like | ||||
(HasTrie a, HasTrie b) => HasTrie (a, b) | |||||
(HasTrie a, HasTrie b, HasTrie c) => HasTrie (a, b, c) | |||||
Defined in Data.MemoTrie
| |||||
(HasTrie (f x), HasTrie (g x)) => HasTrie ((f :*: g) x) | wraps | ||||
(HasTrie (f x), HasTrie (g x)) => HasTrie ((f :+: g) x) | wraps | ||||
Defined in Data.MemoTrie
| |||||
HasTrie a => HasTrie (K1 i a x) | wraps | ||||
HasTrie (f x) => HasTrie (M1 i t f x) | wraps | ||||
memo2 :: (HasTrie s, HasTrie t) => (s -> t -> a) -> s -> t -> a #
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 -> a #
Memoize a ternary function on successive arguments. Take care to exploit any partial evaluation.
memo4 :: (HasTrie a, HasTrie b, HasTrie c, HasTrie d) => (a -> b -> c -> d -> e) -> a -> b -> c -> d -> e Source #
Memoize a quaternary function on successive arguments. Take care to exploit any partial evaluation.