Module

QualifiedDo.FoldMap

Package
purescript-qualified-do
Repository
artemisSystem/purescript-qualified-do

Accumulate do block entries in a Semigroup while mapping over them. Example:

import QualifiedDo.FoldMap as F

-- Equivalent to: foldMap f [a, b, c]
F.foldMap f F.do
  a
  b
  c

#foldMap Source

foldMap :: forall a b s. Convert s (Statements a) => Monoid b => (a -> b) -> s -> b

Re-exports from QualifiedDo.Statements

#discard Source

discard :: forall s a. Convert s (Statements a) => a -> (Unit -> s) -> Statements a

#bind Source

bind :: forall s a. Convert s (Statements a) => a -> (a -> s) -> Statements a