All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kotlin.Functions.kt Maven / Gradle / Ivy

There is a newer version: 2.1.0-Beta1
Show newest version
package kotlin

public fun  Function1.toGenerator(initialValue: T): Function0 {
    var nextValue: T? = initialValue
    return {
        nextValue?.let { result ->
            nextValue = this@toGenerator(result)
            result
        }
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy