scala/scala — pull request #1181 by Blaisorblade (2012-08-22 18:56:15+00:00)
Title: Backport "Make Stream.withFilter.{map,flatMap} run in constant stack space" against 2.9.x

This is a backport of https://github.com/scala/scala/pull/1167. I produced the backport using `git cherry-pick` and got no conflict; I could reproduce the failure with `2.9.x` current HEAD, and no failure after applying this fix.

Review by @axel22