m00qek/elm-applicative/1.0.0

NOTE: this package is not compatible with Elm 0.19.1

Applicative.Function

Instances of Functor and Applicative for functions.

#Functor

fmap : (a -> b) -> (p -> a) -> p -> b

Function composition; a prefix synonym for <<.

(<$>) : (a -> b) -> (p -> a) -> p -> b

An infix synonym for fmap.

(<$) : a -> (p -> b) -> p -> a

Replace all locations in the input with the same value.

($>) : (p -> a) -> b -> p -> b

Flipped version of <$.

#Applicative

pure : a -> p -> a

Lift a value.

apply : (p -> a -> b) -> (p -> a) -> p -> b

Sequential application.

(<*>) : (p -> a -> b) -> (p -> a) -> p -> b

Sequential application.

(<*) : (p -> a) -> (p -> b) -> p -> a

Sequence actions, discarding the value of the second argument.

(*>) : (p -> a) -> (p -> b) -> p -> b

Sequence actions, discarding the value of the first argument.

(<**>) : (p -> a) -> (p -> a -> b) -> p -> b

A variant of <*> with the arguments reversed.

liftA : (a -> b) -> (p -> a) -> p -> b

Lift a function to actions. This function may be used as a value for fmap.

liftA2 : (a -> b -> c) -> (p -> a) -> (p -> b) -> p -> c

Lift a binary function to actions.

liftA2 : (a -> b -> c) -> (p -> a) -> (p -> b) -> p -> c

Lift a binary function to actions.

liftA3 : (a -> b -> c -> d) -> (p -> a) -> (p -> b) -> (p -> c) -> p -> d

Lift a ternary function to actions.