SimpleH-1.0.1: A light, clean and powerful Haskell utility library

Safe HaskellNone

SimpleH.Applicative

Description

A module describing applicative functors

Synopsis

Documentation

newtype ZipList a Source

A wrapper type for lists with zipping Applicative instances, such that ZipList [f1,...,fn] <*> ZipList [x1,...,xn] == ZipList [f1 x1,...,fn xn]

Constructors

ZipList 

Fields

getZipList :: [a]
 

newtype ZipTree a Source

The Tree equivalent to ZipList

Constructors

ZipTree (Tree a) 

newtype Backwards f a Source

A wrapper for applicative functors with actions executed in the reverse order

Constructors

Backwards 

Fields

forwards :: f a
 

(*>) :: Applicative f => f b -> f a -> f aSource

(<*) :: Applicative f => f a -> f b -> f aSource

(<**>) :: Applicative f => f (a -> b) -> f a -> f bSource

ap :: Applicative f => f (a -> b) -> f a -> f bSource

sequence_ :: (Applicative f, Foldable t) => t (f a) -> f ()Source

traverse_ :: (Applicative f, Foldable t) => (a -> f b) -> t a -> f ()Source

for_ :: (Applicative f, Foldable t) => t a -> (a -> f b) -> f ()Source

forever :: Applicative f => f a -> f bSource

between :: Applicative f => f b -> f c -> f a -> f aSource

liftA :: Functor f => (a -> b) -> f a -> f bSource

liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f cSource

liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f dSource

liftA4 :: Applicative f => (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f eSource

plusA :: (Applicative f, Semigroup a) => f a -> f a -> f aSource

zeroA :: (Unit f, Monoid a) => f aSource

filter :: (Unit f, Monoid (f a), Foldable t) => (a -> Bool) -> t a -> f aSource