Created
August 5, 2018 19:34
-
-
Save vialyx/e6588aa068b2407f4e019cb27cc6e25d 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
let integers = [1, 2, 3, 4, 5] | |
/* | |
Inferring Type From Context | |
Compile already know the result is String array | |
*/ | |
/* | |
Implicit Returns from Single-Expression Closures | |
Just String($0) | |
*/ | |
/* | |
Shorthand Argument Names | |
Just $0 | |
*/ | |
let result = integers.map { String($0) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment