Both [conduit](http://hackage.haskell.org/package/conduit-combinators-1.1.1/docs/Data-Conduit-Combinators.html#v:slidingWindow) and [streaming](http://hackage.haskell.org/package/streaming-0.1.4.5/docs/Streaming-Prelude.html#v:slidingWindow) have that function. I haven't found it for pipes, but it would be a producer-to-producer function.