morphisms-functors-0.1.2: Functors, theirs compositions and transformations

Safe HaskellSafe
LanguageHaskell2010

Control.Functor.Applicative

Synopsis

Documentation

class Covariant t => Applicative t where Source #

When providing a new instance, you should ensure it satisfies the three laws:
* Composition: (.) <$> u <*> v <*> w ≡ u <*> (v <*> w)
* Left interchange: x <*> (f <$> y) ≡ (. f) <$> x <*> y
* Right interchange: f <$> (x <*> y) ≡ (f .) <$> x <*> y

Minimal complete definition

(<*>)

Methods

(<*>) :: t (a -> b) -> t a -> t b infixl 4 Source #

Infix version of apply

apply :: t (a -> b) -> t a -> t b Source #

Prefix version of <*>

(*>) :: t a -> t b -> t b infixl 4 Source #

Sequence actions, discarding the value of the first argument

(<*) :: t a -> t b -> t a infixl 4 Source #

Sequence actions, discarding the value of the second argument

forever :: t a -> t b Source #

Repeat an action indefinitely