Last active
August 29, 2015 14:02
-
-
Save mwhuss/676444a3fffffcea8d23 to your computer and use it in GitHub Desktop.
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 add(a: Int, b: Int) -> Int { | |
return a + b | |
} | |
add(1, 2) | |
func add(a: Int, #b: Int) -> Int { | |
return a + b | |
} | |
add(1, b: 2) | |
class Math { | |
func add(a: Int, b: Int) -> Int { | |
return a + b | |
} | |
func add2(a: Int, withB b: Int) -> Int { | |
return a + b | |
} | |
func add3(a: Int, _ b: Int) -> Int { | |
return a + b | |
} | |
func add4(#a: Int, b: Int) -> Int { | |
return a + b | |
} | |
func add5(#a: Int, _ b: Int) -> Int { | |
return a + b | |
} | |
} | |
Math().add(1, b: 2) | |
Math().add2(1, withB: 2) | |
Math().add3(1, 2) | |
Math().add4(a: 1, b: 2) | |
Math().add5(a: 1, 2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I still regularly reference this.