difference(_ values: [Element], iteratee: ((Element) -> Element)) -> [Element]
This method is like difference except that it accepts iteratee which is invoked for each element of array and values to generate the criterion by which uniqueness is computed.
Parameters
- values: The values to exclude.
- iteratee: The iteratee invoked per element.
Returns
The new array of filtered values.
[3.1, 2.2, 1.3].differenceBy([4.4,2.5], iteratee: floor)
// -> [3.1,1.3]