Swift 5.1 references for busy coders
Functional methods comparison
||Returns an array that contains the results of mapping a given closure over the elements of a sequence.
||Just like map, except that
nil results are filtered out.
||Just like map, but if the result is an array of arrays, the arrays are concatenated (flattened) into a single array.
||Returns an array containing only the elements of a sequence that satisfy a given predicate, in their original order.
||Returns the result of combining the elements of a sequence using a given closure.
||Returns the elements of a sequence sorted using a particular predicate.
||Calls a closure on each element in a sequence in the same order as a for-in loop. Does not return anything.