summaryrefslogtreecommitdiff
path: root/test/files/run/iterator-iterate-lazy.scala
blob: 73886f192b44e5f12c65be86054792892543c160 (plain) (blame)
1
2
3
4
5
object Test {
  def main(args: Array[String]): Unit = {
    Iterator.iterate(1 to 5 toList)(_.tail).takeWhile(_.nonEmpty).map(_.head).toList
  }
}