Functions as values
Pass a function when its caller should choose an operation, or store one for later. The first lessons need only the core path; generic signatures and records also use type parameters and constraints.
- Pass functions as values
- Anonymous functions
- Capture data and private state
- Accept functions and closures through one API
- Borrow in a closure
- Return a closure
- Generic function values
- Transform a cell with a generic method
- Store stateful callbacks
- Store owned closures
- Reduce a borrowed collection with a pipeline
- Transform a stream of values
- Keep callbacks in tuples and lists
- Name stored callbacks
- Store different captured callbacks
- Put a callback in an enum
- Consume a capture
- Consume a callback
- Consume owned data while borrowing local state
- Store consuming jobs