We discuss how the functional concepts we've covered so far, such as first-class functions, allow us to work with arrays in a cleaner, more readable way using Swift's built-in array functions.
- [Instructor] One of the places…where the functional programming paradigm really shines…through, and one of the reasons it's started…to gain a following in the programming community,…is the ease with which it allows us to work with arrays.…There's an inherent difficulty in working with arrays using…for loops and many programmers probably remember trying…to track down off by one errors…and other such hard to find bugs.…The fact is, as central as they've been to programming…over the past few decades, there are many places where…for loops are more a necessary evil…than they are a valued part a code base.…Fortunately for us, now that we've got a basic understanding…of the fundamental concepts of functional programming…and how they're expressed in code,…we're ready to learn a better way to work with arrays.…
A way that allows us to code more like we think…without having to worry about array links and indices…and all the individual steps required along the way.…In Swift, arrays have several important built in functions…
- What is functional programming?
- Keeping functions and data separate
- First-class functions
- Working with arrays functionally
- Filtering and reducing
- Partial-application and recursion
Skill Level Intermediate
Swift 4: Protocol-Oriented Programmingwith Károly Nyisztor1h 44m Intermediate
Swift: Delegations and Data Sourceswith Steven Lipton1h 6m Intermediate
Swift: Writing Reusable Frameworkswith David Okun1h 49m Intermediate
1. What Is Functional Programming?
2. First-Class Functions
3. Array Functions
4. Advanced Functional Concepts
Next steps1m 1s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.