takeInterval n fold uses fold to fold the input items arriving within
a window of first n seconds.
input = Stream.delay 0.2 $ Stream.fromList [1..10]Stream.fold (Fold.takeInterval 1.0 Fold.toList) input[1,2,3,4,5,6]
f = Fold.takeInterval 0.5 Fold.toListStream.fold Fold.toList $ Stream.foldMany f input[[1,2,3,4],[5,6,7],[8,9,10]]
Stops when fold stops or when the timeout occurs. Note that the fold needs
an input after the timeout to stop. For example, if no input is pushed to
the fold until one hour after the timeout had occurred, then the fold will
be done only after consuming that input.
Pre-release