comonad-1.0.1: Haskell 98 comonads
Data.Functor.Extend
Contents
Description
Synopsis
class Functor w => Extend w whereSource
Methods
duplicate :: w a -> w (w a)Source
duplicate = extend id fmap (fmap f) . duplicate = duplicate . fmap f
extend :: (w a -> b) -> w a -> w bSource
extend f = fmap f . duplicate
Instances
(=>>) :: Extend w => w a -> (w a -> b) -> w bSource
extend with the arguments swapped. Dual to >>= for a Monad.
extend
>>=
Monad
(<<=) :: Extend w => (w a -> b) -> w a -> w bSource
extend in operator form
(=>=) :: Extend w => (w a -> b) -> (w b -> c) -> w a -> cSource
Left-to-right Cokleisli composition
(=<=) :: Extend w => (w b -> c) -> (w a -> b) -> w a -> cSource
Right-to-left Cokleisli composition