pandora-0.2.0: A box of patterns and paradigms

Pandora.Pattern.Functor.Bindable

Synopsis
• class Covariant t => Bindable t where
• (>>=) :: t a -> (a -> t b) -> t b
• (=<<) :: (a -> t b) -> t a -> t b
• bind :: (a -> t b) -> t a -> t b
• join :: ((t :. t) > a) -> t a
• (>=>) :: (a -> t b) -> (b -> t c) -> a -> t c
• (<=<) :: (b -> t c) -> (a -> t b) -> a -> t c

# Documentation

class Covariant t => Bindable t where Source #

When providing a new instance, you should ensure it satisfies the one law:
* Interchange: t >>= f = join (f <\$> t)

Minimal complete definition

(>>=)

Methods

(>>=) :: t a -> (a -> t b) -> t b infixl 1 Source #

Infix and flipped version of bind, the dual of =>>

(=<<) :: (a -> t b) -> t a -> t b infixr 1 Source #

Flipped version of >>=, the dual of <<=

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

Prefix and flipped version of >>=, the dual of extend

join :: ((t :. t) > a) -> t a Source #

Merge effects/contexts, the dual of duplicate

(>=>) :: (a -> t b) -> (b -> t c) -> a -> t c infixr 1 Source #

Left-to-right Kleisli composition

(<=<) :: (b -> t c) -> (a -> t b) -> a -> t c infixr 1 Source #

Right-to-left Kleisli composition

Instances