Conditional and Data Restructuring Clinic
Attempt these tasks before opening feedback. Preserve initial predictions, diffs, commands, actual results and assistance. Reuse valid lab evidence; extra lesson drills are repair or optional depth.
P11: Consolidate lazily
Implement eligible using a lazy combined predicate. Compare with constructing a list of predicate results first.
P12: Choose a dispatch boundary
Compare a hierarchy, function table and closed match for a stable variant set receiving frequent new operations.
P13: Specify a parameter object
Define DateRange endpoint, time representation and alias rules. Separate added validation from structural wrapping.
P14: Move with a facade
Move a calculation behind a new module boundary while an external caller uses the old import. State removal criteria.
P15: Budget a refactor
Choose a small observed problem, a candidate move, a keep alternative and a stop condition.
Use the behavior contracts and offline labs. For a named gap, consult the Refactoring book index and module reading guide.