Last active
April 21, 2016 07:54
-
-
Save keitaito/8a1014bbabaab780459dd4de50fab902 to your computer and use it in GitHub Desktop.
ShorhandArgumentNamesExample.swift - Run this code on Playground
This file contains 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
//: Playground - noun: a place where people can play | |
let tuples = [("A", "あ"), ("I", "い"), ("U", "う"), ("E", "え"), ("O", "お")] | |
print("With argument list") | |
tuples.forEach { (eng, jpn) in | |
print(eng) | |
print(jpn) | |
} | |
print("Shorthand argument names") | |
tuples.forEach { | |
print($0) | |
print($1) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment