This course dives into the intricacies of functional objects in C++, with a focus on functors, currying, and partial application. You'll learn how to harness these powerful concepts to create more modular, reusable, and maintainable code.
Overview
Syllabus
- Lesson 1: Introduction to Currying and Partial Application
- Transform Function into Curried Function
- Update Logging Functions to Use Partial Application
- Fix the Curried Multiplication Function
- Calculate Total Cost with Partial Application
- Currying with String Concatenation
- Lesson 2: Advanced Currying in C++
- Currying for Basic Arithmetic Operations
- Server Configuration Using Currying
- Curried Function for Calculating Cost
- Add Timestamp to Curried LogMessage Function
- Lesson 3: Creating Functional Objects
- Modify Functor to Filter Younger People
- Create a Functor Class to Filter Numbers within Range
- Divisibility Filter Using Functor
- Create a Functor for Multiplying Elements in a Vector
- Combining Filtering and Transformation Functors
- Lesson 4: Advanced Example with Functional Objects
- Add Function to Print Original Salaries
- Adjusting Product Prices with Functors
- Apply Multiple Functors