blob: d91e2f59cee4a5e4f697c7005c16a466d6e0fa35 (
plain) (
tree)
|
|
class TailCall[@specialized T] {
final def dropLeft(n: Int, xs: List[T]): List[T] =
if (n == 0) xs
else dropLeft(n - 1, xs.tail)
/*
def filter(pf: PartialFunction[Option[String], Boolean]) = null
def crash(o: Option[String]) = filter {
case None if {
def dropLeft[T](n: Int, xs: List[T]): List[T] =
if (n == 0) xs
else dropLeft(n - 1, xs.tail)
dropLeft(2, List(1, 2, 3)).isEmpty
} => true
}
*/
}
|