import { Kind } from '../../kinds/index.js'; import { Applicative } from './applicative'; import { TypeSkell } from '../../typeskell/index.js'; /** * Applicative is a typeclass that provides a way to apply a function in a context to a value in a context. * * Laws: * - Identity: (of id) <*> u = u * - Homomorphism: (of f) <*> (of x) = of (f x) * - Interchange: u <*> (of y) = of ($ y) <*> u * - Composition: ((of (.) <*> u) <*> v) <*> w = u <*> (v <*> w) */ declare namespace applicativeLaws { type $identity = TypeSkell<'F a ..e -> F a ..e', { F: F; }>; type $homomorphism = TypeSkell<'(a -> b) a -> F b ..e', { F: F; }>; type $interchange = TypeSkell<'(F (a -> b) ..e) a -> F b ..e', { F: F; }>; type $composition = TypeSkell<'(F (b -> c) ..e) (F (a -> b) ..e) (F a ..e) -> F c ..e', { F: F; }>; } export declare const applicativeLaws: (functor: Applicative) => { identity: { left: applicativeLaws.$identity; right: applicativeLaws.$identity; }; homomorphism: { left: applicativeLaws.$homomorphism; right: applicativeLaws.$homomorphism; }; interchange: { left: applicativeLaws.$interchange; right: applicativeLaws.$interchange; }; composition: { left: applicativeLaws.$composition; right: applicativeLaws.$composition; }; }; export {};