Created
January 27, 2017 07:48
-
-
Save twof/6b8ac8e287d3d68c247fe16a8e90f62b 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 swapTwoInts(_ a: inout Int, _ b: inout Int) { | |
| let temporaryA = a | |
| a = b | |
| b = temporaryA | |
| } | |
| func swapTwoDoubles(_ a: inout Double, _ b: inout Double) { | |
| let temporaryA = a | |
| a = b | |
| b = temporaryA | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment