Skip to content

Instantly share code, notes, and snippets.

@nbness2
Created December 22, 2021 09:49
Show Gist options
  • Save nbness2/43038b949797ec3aa0e15b232cf36933 to your computer and use it in GitHub Desktop.
Save nbness2/43038b949797ec3aa0e15b232cf36933 to your computer and use it in GitHub Desktop.
fun interface ReturnString {
fun getString()
}
fun string(rs: ReturnString) = rs
fun main() {
val str = string { "A String" }
println(str.string)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment