Control.Helpers

A set of helper functions to ease the process of working with the Control.* protocols.

Summary

Functions

Compose operator

Bind operator

Functions

left <|> right

Specs

Function.t <|> Function.t :: Function.t

Compose operator.

The compose operator (. in Haskell) removes the need for using apply/2 or .() to call an anonymous function, so

f.(g.(x)) or f |> apply([g |> apply([x])])

becomes

(
left ~>> right

Bind operator.

The bind operator (>>= in Haskell) removes the need for piping to a call to Control.Monad.bind/2, so

functor |> Control.Monad.bind(fun)

becomes

functor ~>> fun