levmar-0.2.1: An implementation of the Levenberg-Marquardt algorithmSource codeContentsIndex
NFunction
Synopsis
type family NFunction n a b :: *
($*) :: NFunction n a b -> SizedList n a -> b
class Nat n => ComposeN n where
compose :: forall a b c. n -> a -> (b -> c) -> NFunction n a b -> NFunction n a c
Documentation
type family NFunction n a b :: *Source
A NFunction n a b is a function which takes n arguments of type a and returns a b. For example: NFunction (S (S (S Z))) a b ~ (a -> a -> a -> b)
($*) :: NFunction n a b -> SizedList n a -> bSource
f $* xs applies the n-arity function f to each of the arguments in the n-sized list xs.
class Nat n => ComposeN n whereSource
Methods
compose :: forall a b c. n -> a -> (b -> c) -> NFunction n a b -> NFunction n a cSource

Composition of NFunctions.

Note that the n and a arguments are used by the type checker to select the right ComposeN instance. They are usally given as (witnessNat :: n) and (undefined :: a).

show/hide Instances
Produced by Haddock version 2.4.2