quiver-interleave-0.2.0.1: Interleave values from multiple Quivers

Copyright(c) Ivan Lazar Miljenovic
LicenseMIT
MaintainerIvan.Miljenovic@gmail.com
Safe HaskellNone
LanguageHaskell2010

Control.Quiver.Interleave

Description

 

Synopsis

Documentation

spinterleave :: Monad f => (b -> b -> Ordering) -> [P a a' b () f (SPResult e)] -> P a a' b () f (SPResult e) Source

Interleave the elements of the provided producers such that the result consists of the values from all of them merged in by the provided comparison function.

That is, if each provided Quiver returns a sequence of ordered elements, then this would be the same as obtaining all the elements and sorting them.

If any provided Quiver results in anything except SPComplete then entire stream halts, propagating the error.