Skip to content

Instantly share code, notes, and snippets.

@mahdyadi
Last active April 20, 2020 01:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mahdyadi/f5a1a45803f27700223e886810faf2e1 to your computer and use it in GitHub Desktop.
Save mahdyadi/f5a1a45803f27700223e886810faf2e1 to your computer and use it in GitHub Desktop.
fun operate(subject: String, action: String.()->String) {
val acted = subject.action()
println(acted)
}
operate("foo"){
"$this bar"
} // foo bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment