Learning Higher-Order Functions with Swift
1h 7mAdvanced2018-11-29
Authors

Bear Cahill
Mobile Application Developer
Course details
By taking the time to truly grasp higher-order functions, you'll go from merely understanding the Swift language to mastering it. In this course, Bear Cahill shines a spotlight on higher-order functions in Swift, exploring what they are and how to use them. Bear starts by discussing the importance of higher-order functions and the basics of closures and functions as a basis for the rest of the course. He then covers a variety of higher-order functions—including sort, reduce, and compactMap—with a breakdown of the concepts behind each one (so you know when best to apply them). Learn about passing functions, closure optimizations, higher-order functions on strings, and more.
Learning objectives
What are closures?
Closures and function types
Basic higher-order functions, including sort and forEach
Powerful higher-order functions, including map and reduce
Passing functions
Closure optimizations
Higher-order functions on sets, dictionaries, and strings
Learning objectives
What are closures?
Closures and function types
Basic higher-order functions, including sort and forEach
Powerful higher-order functions, including map and reduce
Passing functions
Closure optimizations
Higher-order functions on sets, dictionaries, and strings
Skills covered
SwiftCross-Platform DevelopmentiOSMobile DevelopmentAppleLearning
Concepts
Introduction
- Understanding higher-order functions
- What you should know
Closures and Functions
- What are closures
- Functions are closures
- Closures and function types
- Passing closures functions as parameters
- Type aliases for types
Basic Higher-Order Functions
- Higher-order functions
- Sort
- Sorted
- Foreach
Powerful Higher-Order Functions
- Map
- Filter
- CompactMap
- FlatMap
- Reduce
- Other higher-order functions
Using Higher Order Functions
- Passing functions
- Closure optimizations
- Chaining higher-order functions
- Higher-order functions on sets
- Higher-order functions on dictionaries
- Higher-order functions on strings
Conclusion
- Next steps