Skip to content

Commit

Permalink
Use compact syntax for map to better stick with the Kotlin example
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Batty authored and Nilhcem committed Jun 7, 2016
1 parent 84511da commit f317e15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/map.swift
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
var numbers = [20, 19, 7, 12]
numbers.map({ number in 3 * number })
let numbers = [20, 19, 7, 12]
numbers.map { 3 * $0 }

0 comments on commit f317e15

Please sign in to comment.