Run Code
|
Code Wall
|
Users
|
Misc
|
Feedback
|
About
|
Login
|
Theme
GenerateFibonacci47
//Kotlin 1.1 import java.util.* fun main(vararg args: String) { println(fibonacci().take(47).toList()) } fun fibonacci(): Sequence<Int> { return generateSequence(Pair(0, 1)) { Pair(it.second, it.first + it.second) } .map { it.first } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Aula 1 - Orientacao a Objetos - Mao na Massa
My script1
KotlinSessionVII#IS_OPERATOR
KotlineMerg
Calendar 2018 v3.2 (Compressed Coding)
Rotate array
KotlinCopy
?. in Kotlin
Arun1
Kotlin!
Please log in to post a comment.