Skip to main content
Loading page…
Python Mastery
Chapter 8
Lesson 1 of 4
Higher-Order Functions
Contents
Notes
Tutor
Concept
Functions Are Objects — The Mental Model
Loading activity…
Previous
1 / 13
Continue
Contents
Notes
Discussion
Tutor
32 min
13 activities
0 of 13 done
In this lesson
1
Functions Are Objects — The Mental Model
2
Bridge: Importing Standard-Library Helpers
3
Passing Functions as Arguments
4
List Comprehension Syntax — A Quick Gloss
5
Returning Functions — Factories & Closures
6
map(), filter(), and functools.reduce()
7
map() and filter() Return Lazy Iterators
8
map/filter vs Comprehensions — When to Use Which
9
Build a filter-map-reduce Pipeline
10
Which statement about Python functions is TRUE?
11
Function Factory: make_validator
12
Reduce with an Initializer
13
Functions as Values: Your Perspective
Objectives
Pass functions as arguments and return them from other functions
Apply map(), filter(), and functools.reduce() correctly and know when to prefer comprehensions instead
Explain why functions are first-class objects in Python
Chapter 8 · Functional Python & the functools Toolkit
Higher-Order Functions
functools In Depth
The operator Module & Function Composition
Pure Functions & Immutability
Previous: pip, PyPI & Dependencies
Next: functools In Depth