Skip to content

Instantly share code, notes, and snippets.

@nrohmen
Created May 24, 2019 00:27
Show Gist options
  • Save nrohmen/a044d5e1e7dd4334441eefc23d129b41 to your computer and use it in GitHub Desktop.
Save nrohmen/a044d5e1e7dd4334441eefc23d129b41 to your computer and use it in GitHub Desktop.
import kotlin.system.measureTimeMillis
fun main(args : Array<String>){
val time = measureTimeMillis{
val fibo = generateSequence(1 to 1) {
it.second to it.first + it.second
}.map{ it.second }
println(fibo.take(10000).joinToString())
}
print("completed in $time ms")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment