April 2017
Intermediate to advanced
316 pages
9h 33m
English
The filter function is a higher-order function that takes a function that, given an element in the array, returns Bool, indicating whether the element should be included in the resulting array. Consider the following example:
let evenNumbers = numbers.filter { $0 % 2 == 0 }
Read now
Unlock full access