A functor with application. It can combine sequence computations with apply or liftA2 function.
apply
liftA2
All instances of the applicative a must satisfy the following laws:
a
x
a.apply(a.pure((i) => i))(x)
y
z
a.apply(a.apply(a.apply(a.pure((f) => (g) => (i) => f(g(i))))(x))(y))(z)
a.apply(x)(a.apply(y)(z))
f
a.apply(a.pure(f))(a.pure(x))
a.pure(f(x))
a.apply(f)(a.pure(x))
a.apply(a.pure((i) => i(x)))(f)
Readonly
Applies the function to the value over S.
S
The wrapped function.
The value got by evaluating fn.
fn
Maps the function fn onto F structure.
F
The function to be mapped.
The mapped function.
Generated using TypeDoc
A functor with application. It can combine sequence computations with
apply
orliftA2
function.All instances of the applicative
a
must satisfy the following laws:x
;a.apply(a.pure((i) => i))(x)
equals tox
,x
,y
andz
;a.apply(a.apply(a.apply(a.pure((f) => (g) => (i) => f(g(i))))(x))(y))(z)
equals toa.apply(x)(a.apply(y)(z))
,f
andx
;a.apply(a.pure(f))(a.pure(x))
equals toa.pure(f(x))
,f
andx
;a.apply(f)(a.pure(x))
equals toa.apply(a.pure((i) => i(x)))(f)
.