We discuss the meaning of first-class functions, and their importance in the world of functional programming. The benefits of first-class functions and the flexibility they provide are also discussed.
- [Instructor] The third major concept…of functional programming is something…called first-class functions.…In object oriented programming, we generally treat variables…and functions as entirely different entities.…We would never think of, for example, assigning functions…to variables or passing functions…as arguments to other functions.…In functional programming, however, we can treat functions…in a very similar way to how we treat other values…such as numbers and strings.…This concept is what we mean when we talk…about first-class functions.…What this means is that we can assign functions…to variables, pass them as arguments to functions,…and even return them from other functions.…
As we'll see, this can give our programs…tremendous flexibility.…For example, this concept can allow us…to combine existing functions to create new functions.…We'll see in the next chapter how this is done…and what its implications are for our programs.…
- 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.