Functional Programming with Python
functional-programmingpythonhigher-order-functionscurryingpartial-application
Abstraction: Functional programming patterns in Python via slides and examples
Key points:
- Contrasts imperative style (mutable state, explicit loops) with functional style (map/filter/reduce transformations and compositions).
- Demonstrates Python's
functools.partialfor partial application andoperatormodule for first-class function values. - Shows currying and higher-order functions via
fsum(f)pattern — a factory returning specialized sum functions (square sum, log sum, etc.) from a single generic function. - Covers decorators as syntactic sugar for higher-order functions (e.g., a
timerwrapper). - Illustrates building OO-like constructs (classes with immutable bindings) purely from closures and
functools.partial. - Presented at UA PyCon 2012 by Alexey Kachayev; companion code at github.com/kachayev/talks.
Connections: Python · Functional Programming · Higher Order Functions · Currying · Partial Application
Source: http://kachayev.github.io/talks/uapycon2012/index.html#/17