Skip to content

Instantly share code, notes, and snippets.

@ezura
Created July 6, 2017 07:32
Show Gist options
  • Save ezura/b4eb3f871f2e20838975b585ab0f2501 to your computer and use it in GitHub Desktop.
Save ezura/b4eb3f871f2e20838975b585ab0f2501 to your computer and use it in GitHub Desktop.
class S {
fun f(v: Int): String = "f"
}
fun main() {
var sf: (S, Int) -> String = S::f
var _sf: S.(Int) -> String = sf
val sf1: String = sf(S(), 1)
val sf2: String = _sf(S(), 1)
}
class S {
func f(_ v: Int) -> String { return "f" }
}
var sf: (S) -> (Int) -> String = S.f
//var _sf: (S, Int) -> String = sf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment