Copyright | (c) Edward Kmett 2010-2021 |
---|---|
License | BSD3 |
Maintainer | ekmett@gmail.com |
Stability | experimental |
Portability | GHC only |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Unsafe and often partial combinators intended for internal usage.
Handle with care.
Synopsis
- data Forward a
- primal :: Num a => Forward a -> a
- tangent :: Num a => Forward a -> a
- bundle :: a -> a -> Forward a
- unbundle :: Num a => Forward a -> (a, a)
- apply :: Num a => (Forward a -> b) -> a -> b
- bind :: (Traversable f, Num a) => (f (Forward a) -> b) -> f a -> f b
- bind' :: (Traversable f, Num a) => (f (Forward a) -> b) -> f a -> (b, f b)
- bindWith :: (Traversable f, Num a) => (a -> b -> c) -> (f (Forward a) -> b) -> f a -> f c
- bindWith' :: (Traversable f, Num a) => (a -> b -> c) -> (f (Forward a) -> b) -> f a -> (b, f c)
- transposeWith :: (Functor f, Foldable f, Traversable g) => (b -> f a -> c) -> f (g a) -> g b -> g c
Documentation
Forward
mode AD
Instances
bindWith' :: (Traversable f, Num a) => (a -> b -> c) -> (f (Forward a) -> b) -> f a -> (b, f c) Source #
transposeWith :: (Functor f, Foldable f, Traversable g) => (b -> f a -> c) -> f (g a) -> g b -> g c Source #