static-tensor-0.2.1.0: Tensors of statically known size

Copyright(C) 2017 Alexey Vagarenko
LicenseBSD-style (see LICENSE)
MaintainerAlexey Vagarenko (vagarenko@gmail.com)
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe
LanguageHaskell2010

Data.Function.NAry

Description

 

Synopsis

Documentation

type family NAry (n :: Nat) (t :: Type) (r :: Type) :: Type where ... Source #

N-ary function from n arguments of type t to value of type r.

Equations

NAry 0 t r = r 
NAry n t r = t -> NAry (n - 1) t r 

class ApplyNAry (n :: Nat) (t :: Type) (r :: Type) where Source #

Apply list of params to N-ary function.

Minimal complete definition

applyNAry

Methods

applyNAry :: NAry n t r -> [t] -> r Source #

Instances

(ApplyNAry ((-) n 1) t r, (~) Type (NAry n t r) (t -> NAry ((-) n 1) t r), KnownNat n) => ApplyNAry n t r Source # 

Methods

applyNAry :: NAry n t r -> [t] -> r Source #

ApplyNAry 0 t r Source # 

Methods

applyNAry :: NAry 0 t r -> [t] -> r Source #