Created
June 24, 2017 05:29
-
-
Save ezura/b0e1bdaef70874deeac394fc88c4c816 to your computer and use it in GitHub Desktop.
さっきの "返り値だけジェネリクス" はこういうのかな(´・ω・`)?
その前のスライドで考えてたら聞きそびれた… #swift #CodePiece #ジェネリクス勉強会
This file contains hidden or 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 f<T: ExpressibleByIntegerLiteral>() -> T { | |
| return 1 // as T | |
| } | |
| let int: Int = f() | |
| let double: Double = f() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment