orangy
inline fun <T> Iterable<T>.lazy() = asSequence()
works for you? simple smileilya.gorbunov
01/25/2016, 2:25 PMimport kotlin.collections.asSequence as lazy
, although code completion doesn't work quite well for this aliased import currently.voddan
01/25/2016, 6:24 PMvoddan
01/25/2016, 6:30 PMlazy
, seq
, asq
, etcorangy
orangy
eric.kolotyluk
02/06/2016, 3:28 AMeric.kolotyluk
02/06/2016, 3:29 AMeric.kolotyluk
02/06/2016, 3:35 AMcedric
02/06/2016, 3:38 AMCanBuildFrom
dearlyeric.kolotyluk
02/06/2016, 3:38 AMfor ((k, v) in map) {
println("$k -> $v")
}
I have wanted to do things this easily in Scala for a long time, but I tire of the explanations from some people as to why I am a stupid idiot for expecting that. I really appreciate that in Kotlin, it just works, it's readable, and easy to remember. Granted it's still incomplete, but things are improving in a direction I like.eric.kolotyluk
02/06/2016, 3:40 AMeric.kolotyluk
02/06/2016, 3:41 AMcedric
02/06/2016, 3:42 AMeric.kolotyluk
02/06/2016, 3:46 AMeric.kolotyluk
02/06/2016, 3:47 AMeric.kolotyluk
02/06/2016, 3:48 AMcedric
02/06/2016, 3:52 AMeric.kolotyluk
02/06/2016, 3:52 AMcedric
02/06/2016, 3:53 AMcedric
02/06/2016, 3:54 AMjkwatson
02/06/2016, 4:31 AMeric.kolotyluk
02/06/2016, 4:34 AMcedric
02/06/2016, 4:35 AMandrewoma
02/06/2016, 4:35 AMcedric
02/06/2016, 4:35 AMcedric
02/06/2016, 4:36 AMeric.kolotyluk
02/06/2016, 4:36 AMcedric
02/06/2016, 4:37 AM