Witchcraft v0.5.0 Witchcraft.Applicative.Function
Function helpers, derivatives and operators for
Witchcraft.Applicative.Protocol
Summary
Functions
lift
a function over 2 arguments
lift
a function over 3 arguments
lift
a function over 4 arguments
Sequentially seq
, and discard the second value of each pair
Sequentially seq
, and discard the first value of each pair
Types
applicative :: any
Functions
Specs
lift(applicative, applicative, (... -> any)) :: applicative
lift(applicative, applicative, (... -> any)) :: applicative
lift
a function over 2 arguments
Examples
iex> lift([1,2,3], [4,5,6], &(&1 + &2))
[5,6,7,6,7,8,7,8,9]
Specs
lift(applicative, applicative, applicative, (... -> any)) :: applicative
lift
a function over 3 arguments
Examples
iex> lift([1,2], [3,4], [5,6], &(&1 + &2 + &3))
[9,10,10,11,10,11,11,12]
lift
a function over 4 arguments
Examples
iex> lift([1,2], [3,4], [5,6], [7,8], &(&1 + &2 + &3 + &4))
[16,17,17,18,17,18,18,19,17,18,18,19,18,19,19,20]
Specs
seq_first(applicative, applicative) :: any
Sequentially seq
, and discard the second value of each pair.
Specs
seq_second(applicative, applicative) :: any
Sequentially seq
, and discard the first value of each pair.