Higher-order Functions: Part II
Let's review the most common Higher Order Functions in Rust.
We'll cover the following
The most common HOFs
Higher-order functions are common in Rust in two different fields of application:
- Iterators
- Options
Knowing the most common of these functions and how to use them can give our code a performance boost.
Helpful tips for the rest of the course
- Play with the code. The more you play, the more you will understand HOF and by extension FP.
- Keep this lesson open while you’re going through the rest of the course. These core concepts will be helpful all the way to the end.
- The list below not only contains HOFs, but also some other useful methods for dealing with iterators, options, and results.
- Most
Result
have some HOFs. However, if you know the HOFs present inOption
, then you already know most of the HOFs relevant toResult
. Rust’s official documentation has all the details.
Get hands-on with 1400+ tech skills courses.