blob: 5f009b7a496edeccc3a231040e5b8e42ae5949e6 (
plain) (
tree)
|
|
object Test4649 {
// @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)
}
}
|