A higher order function is a function that takes one or more functions as argument and returns a function as its result. With higher order function, we can use existing functionalities of Swift to achieve more with less effort.
Swift has multiple higher order functions like:
- Map
- Compact Map
- Map Values
- Flat map
- Filter
- Reduce
- For Each
- Remove All
- Sorted
- Contains
- Split