set-algebra-1.1.0.2: Set Algebra
Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Iterate.Collect

Synopsis

Documentation

newtype Cont ans x Source #

Constructors

Cont 

Fields

Instances

Instances details
Applicative (Cont ans) Source # 
Instance details

Defined in Control.Iterate.Collect

Methods

pure ∷ a → Cont ans a Source #

(<*>)Cont ans (a → b) → Cont ans a → Cont ans b Source #

liftA2 ∷ (a → b → c) → Cont ans a → Cont ans b → Cont ans c Source #

(*>)Cont ans a → Cont ans b → Cont ans b Source #

(<*)Cont ans a → Cont ans b → Cont ans a Source #

Functor (Cont ans) Source # 
Instance details

Defined in Control.Iterate.Collect

Methods

fmap ∷ (a → b) → Cont ans a → Cont ans b Source #

(<$) ∷ a → Cont ans b → Cont ans a Source #

Monad (Cont r) Source # 
Instance details

Defined in Control.Iterate.Collect

Methods

(>>=)Cont r a → (a → Cont r b) → Cont r b Source #

(>>)Cont r a → Cont r b → Cont r b Source #

return ∷ a → Cont r a Source #

newtype Collect tuple Source #

Constructors

Collect 

Fields

  • runCollect ∷ ∀ ans. ans → (tuple → ans → ans) → ans
     

Instances

Instances details
Foldable Collect Source # 
Instance details

Defined in Control.Iterate.Collect

Methods

foldMonoid m ⇒ Collect m → m Source #

foldMapMonoid m ⇒ (a → m) → Collect a → m Source #

foldMap'Monoid m ⇒ (a → m) → Collect a → m Source #

foldr ∷ (a → b → b) → b → Collect a → b Source #

foldr' ∷ (a → b → b) → b → Collect a → b Source #

foldl ∷ (b → a → b) → b → Collect a → b Source #

foldl' ∷ (b → a → b) → b → Collect a → b Source #

foldr1 ∷ (a → a → a) → Collect a → a Source #

foldl1 ∷ (a → a → a) → Collect a → a Source #

toListCollect a → [a] Source #

nullCollect a → Bool Source #

lengthCollect a → Int Source #

elemEq a ⇒ a → Collect a → Bool Source #

maximumOrd a ⇒ Collect a → a Source #

minimumOrd a ⇒ Collect a → a Source #

sumNum a ⇒ Collect a → a Source #

productNum a ⇒ Collect a → a Source #

Applicative Collect Source # 
Instance details

Defined in Control.Iterate.Collect

Methods

pure ∷ a → Collect a Source #

(<*>)Collect (a → b) → Collect a → Collect b Source #

liftA2 ∷ (a → b → c) → Collect a → Collect b → Collect c Source #

(*>)Collect a → Collect b → Collect b Source #

(<*)Collect a → Collect b → Collect a Source #

Functor Collect Source # 
Instance details

Defined in Control.Iterate.Collect

Methods

fmap ∷ (a → b) → Collect a → Collect b Source #

(<$) ∷ a → Collect b → Collect a Source #

Monad Collect Source # 
Instance details

Defined in Control.Iterate.Collect

Methods

(>>=)Collect a → (a → Collect b) → Collect b Source #

(>>)Collect a → Collect b → Collect b Source #

return ∷ a → Collect a Source #

Show t ⇒ Show (Collect t) Source #

Even though a (Collect t) is a function, if we can (Show t), we can pick an action that collects all the shown t, and turn them into a big multi-line string.

Instance details

Defined in Control.Iterate.Collect

Methods

showsPrecIntCollect t → ShowS Source #

showCollect t → String Source #

showList ∷ [Collect t] → ShowS Source #

fixActionCollect tuple → ans → (tuple → ans → ans) → ans Source #

A (Collect t) is completely agnostic over how ts are beging collected. We can make this abstraction concrete by using fixAction.

mapifyOrd a ⇒ Collect (a, b) → Map a b Source #

listifyCollect (a, b) → [(a, b)] Source #

countCollect (a, b) → Int Source #

one ∷ t → Collect t Source #

Here are several ways to add a new t to what is being collected.

The one and none interface are used when we want collections with 0 or 1 elements

front ∷ t → Collect t → Collect t Source #

The front and rear interface can add to either end of the sequence (both in constant time)

rearCollect t → t → Collect t Source #

whenBoolCollect () Source #

Conditional collecting

takeCIntCollect t → [t] Source #

newtype ColPlus tuple Source #

Constructors

ColPlus 

Fields

  • runColPlus ∷ ∀ ans. ans → (tuple → ans → ans) → (ans → ans → ans) → ans
     

Instances

Instances details
Alternative ColPlus Source # 
Instance details

Defined in Control.Iterate.Collect

Methods

emptyColPlus a Source #

(<|>)ColPlus a → ColPlus a → ColPlus a Source #

someColPlus a → ColPlus [a] Source #

manyColPlus a → ColPlus [a] Source #

Applicative ColPlus Source # 
Instance details

Defined in Control.Iterate.Collect

Methods

pure ∷ a → ColPlus a Source #

(<*>)ColPlus (a → b) → ColPlus a → ColPlus b Source #

liftA2 ∷ (a → b → c) → ColPlus a → ColPlus b → ColPlus c Source #

(*>)ColPlus a → ColPlus b → ColPlus b Source #

(<*)ColPlus a → ColPlus b → ColPlus a Source #

Functor ColPlus Source # 
Instance details

Defined in Control.Iterate.Collect

Methods

fmap ∷ (a → b) → ColPlus a → ColPlus b Source #

(<$) ∷ a → ColPlus b → ColPlus a Source #

Monad ColPlus Source # 
Instance details

Defined in Control.Iterate.Collect

Methods

(>>=)ColPlus a → (a → ColPlus b) → ColPlus b Source #

(>>)ColPlus a → ColPlus b → ColPlus b Source #

return ∷ a → ColPlus a Source #

MonadPlus ColPlus Source # 
Instance details

Defined in Control.Iterate.Collect

Methods

mzeroColPlus a Source #

mplusColPlus a → ColPlus a → ColPlus a Source #

runPlusMonoid a ⇒ ColPlus t → a → (t → a → a) → a Source #