TagFilter

Higher order functions in swift

H

As far as I understood, higher order functions are functions that takes another function/closure as argument and/or returns it. Higher order functions are simply functions that operate on other functions by either taking a function as an argument, or returning a function. Swift’s Array type has a few methods that are higher order functions: sorted, map, filter, and reduce. These methods use...

Category