Last active
August 29, 2015 14:04
-
-
Save adarapata/56594a2e121278e1882c to your computer and use it in GitHub Desktop.
swift楽しい
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 makeIncrementer() -> (Int -> String, num: Int, Int -> Int) { | |
| func addOne(number: Int) -> String { | |
| return String(1 + number) | |
| } | |
| func addOneInt(number: Int) -> Int{ | |
| return number + 1 | |
| } | |
| return (addOne, 5, addOneInt) | |
| } | |
| var increment = makeIncrementer() | |
| increment.0(increment.1) | |
| increment.2(2) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
line 11: "6"line 12: 3