What does () -> unit mean in Kotlin?

Here, () -> Unit is a function type and the Unit after the -> indicates that this function type does not return any meaningful value . Mentioning the Unit cannot be skipped in function types. Unit for Extending Generics. Every function has to return a value.2 May 2019

Sizin İçin Seçtik  How long does Kotlin koans take?

Leave a Reply

Your email address will not be published. Required fields are marked *