summaryrefslogblamecommitdiff
path: root/test/files/pos/t4649.scala
blob: 0d6caa8d7a6a485ebc160b21275d63d06f56a786 (plain) (tree)
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)
  }
}