Skip to content

Instantly share code, notes, and snippets.

@kgn
Last active August 19, 2019 05:58
Show Gist options
  • Save kgn/d7c844f6f9aa5305e7ad1f4ed9008852 to your computer and use it in GitHub Desktop.
Save kgn/d7c844f6f9aa5305e7ad1f4ed9008852 to your computer and use it in GitHub Desktop.
for (i, table) in tables.enumerated() {
print("Table #\(i+1)")
print(table.people
.map{"\($0.name),\($0.food.rawValue)"}
.joined(separator: "\n")
)
}
Name Food
Mr. John Smith Beef
Mrs. Jane Smith Chicken
Mr. Ed Ford Chicken
Mrs. Amanda Doolittle Vegitarian
Mr. Jonny Appleseed Chicken
Mrs. Jessica Appleseed Vegitarian
Timmy Appleseed Kids
Mr. James Doe Chicken
Mrs. Janice Doe Beef
James Doe Jr. Kids
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment