Created
May 24, 2019 00:27
-
-
Save nrohmen/a044d5e1e7dd4334441eefc23d129b41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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