Skip to content

Instantly share code, notes, and snippets.

@ramirez7
Last active January 13, 2022 23:06
Show Gist options
  • Select an option

  • Save ramirez7/0f016a1b0f3d5c6276551ff9d17f6126 to your computer and use it in GitHub Desktop.

Select an option

Save ramirez7/0f016a1b0f3d5c6276551ff9d17f6126 to your computer and use it in GitHub Desktop.
fun <A> trace(a: A): A {
println(a)
return a
}
fun <A, B> named(a: A, b: B) {}
fun main(args: Array<String>) {
named(a = trace("it's"), b = trace("belphegor"))
println("----------")
named(b = trace("belphegor"), a = trace("it's"))
}
/*
OUTPUT:
it's
belphegor
----------
belphegor
it's
*/
@ramirez7
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment