Created
October 25, 2017 21:53
-
-
Save rizumita/b84410ed33181073c9d58fd563fbed59 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
func const<A, B>(_ value: A) -> (B) -> A { | |
return { _ in value } | |
} | |
let f_const: (String) -> () = { const(())(foo("bar")($0)) } | |
f_const("hoge") // 返値がVoidなのでWarningが発生しない |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment