cfn-flip-0.1.0.3: Haskell implementation of aws/cfn-flip
Safe HaskellSafe-Inferred
LanguageHaskell2010

CfnFlip.Conduit

Synopsis

Documentation

takeBalancedC :: Monad m => (a -> Bool) -> (a -> Bool) -> ConduitT a a m () Source #

Take until an ending element, including any reopened-ended in between

>>> :{
runIdentity
  $ runConduit
  $ yieldMany "this is (a thing) here) and more"
  .| takeBalancedC (== '(') (==')')
  .| sinkList
:}
"this is (a thing) here)"

Note that imbalance will terminate early,

>>> :{
runIdentity
  $ runConduit
  $ yieldMany "this is, a) unexpected but b) the best we can do)"
  .| takeBalancedC (== '(') (==')')
  .| sinkList
:}
"this is, a)"

Or just run to the end

>>> :{
runIdentity
  $ runConduit
  $ yieldMany "this is (pretty unlikely"
  .| takeBalancedC (== '(') (==')')
  .| sinkList
:}
"this is (pretty unlikely"

module Conduit

sourceList :: forall (m :: Type -> Type) a i. Monad m => [a] -> ConduitT i a m () #

Yield the values from the list.

Subject to fusion