val natuerlicheZahlen = buildSequence { var a = 1 while (true) { yield(a) a = a + 1 } } natuerlicheZahlen.take(10).forEach { x -> print("$x ") }