402b5e4a13 ^
1 2 3 4 5 6
object Test { // @annotation.tailrec def lazyFilter[E](s: Stream[E], p: E => Boolean): Stream[E] = s match { case h #:: t => if (p(h)) h #:: lazyFilter(t, p) else lazyFilter(t, p) } }