Lecture 10 — Higher-order functions and decorators
Thu 29 Oct 2026 · Boris Bolliet
TL;DR — A decorator is a function applied to a function at definition time. The wrapper it returns is a closure over the original.
Demonstration files
| File | View | Download | Colab |
|---|---|---|---|
lecture10-mine.ipynb |
|||
lecture10.ipynb |
No new data in this lecture. The runs of experiments/cost.py and
experiments/timing.py are synthetic (the chemostat-scale Lotka–Volterra model of
models.CHEMOSTAT). experiments/fib_cache.py reads data/C9.csv, one of the ten
chemostat runs of Blasius, Rudolf, Weithoff, Gaedke and Fussmann, Long-term cyclic
persistence in an experimental predator-prey system, Nature 577, 226–230 (2020),
data set on figshare doi:10.6084/m9.figshare.10045976 (CC BY 4.0), as cited in the
lecture-4 demo.