[Haskell-cafe] Patterns for processing large but finite streams

Eugene Kirpichov ekirpichov at gmail.com
Fri Jul 1 07:39:32 CEST 2011


Hi,

I'm rewriting timeplot to avoid holding the whole input in memory, and
naturally a problem arises:

How to represent large but finite streams and functions that process
them, returning other streams or some kinds of aggregate values?

Examples:
* Adjacent differences of a stream of numbers
* Given a stream of numbers with times, split it into buckets by time
of given width and produce a stream of (bucket, 50%,75% and 90%
quantiles in this bucket)
* Sum a stream of numbers

Is this, perhaps, what comonads are for? Or iteratees?

-- 
Eugene Kirpichov
Principal Engineer, Mirantis Inc. http://www.mirantis.com/
Editor, http://fprog.ru/



More information about the Haskell-Cafe mailing list