Witchcraft v0.5.0
Witchcraft.Monad.Operator
Summary
Operator alias for bind
, with arguments reversed
Functions
Specs
(any, any -> any) <<< any :: any
Operator alias for bind
, with arguments reversed
Examples
iex> use Witchcraft.Applicative
...> fn x -> [x * 10] end <<< [1,2,3]
[10, 20, 30]
Specs
(... -> any) <~> (... -> any) :: (... -> any)
Specs
any >>> (any, any -> any) :: any
Operator alias for bind
Examples
iex> use Witchcraft.Applicative
...> [1,2,3] >>> fn x -> [x * 10] end
[10, 20, 30]
iex> [1,2,3] >>> fn x ->
...> [x+1] >>> fn y ->
...> [y*x, y*10, x-1]
...> end
...> end
[2,20,0,6,30,1,12,40,2]