Last active
September 18, 2022 16:54
-
-
Save s1monw1/2f71c233a7e47e70c813057aceb69487 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
// Defines a variable named `greet` of type `String.() -> Unit`. | |
// This is a function literal with receiver type in which the receiver is of type `String` | |
var greet: String.() -> Unit = { println("Hello $this, your name contains $length letters.") } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is great stuff (I'm teaching myself Kotlin).