pipes-ordered-zip-1.0.0.1: merge two ordered Producers into a new Producer

Safe HaskellSafe
LanguageHaskell2010

Pipes.OrderedZip

Description

A function to tie together two sorted Haskell Iterators

Synopsis

Documentation

orderedZip Source #

Arguments

:: Monad m 
=> (a -> b -> Ordering)

The function to compare types of a with b

-> Producer a m r1

The first producer (has to be ordered)

-> Producer b m r2

The second producer (has to be ordered)

-> Producer (Maybe a, Maybe b) m (r1, r2)

The merged producer

orderedZip takes a comparison function and two producers and merges them together, creating a new Producer that yields pairs or Maybes of the two datatables provided by the two original producers