Skip to main content

The Pipeline Refactor

Challenge on lesson: Checkpoint: Architecture

Implement the decomposed pipeline for expense lines "name,amount": parse_amount(line) (double; 0.0 on missing/invalid), is_valid(line) (name non-empty AND amount > 0), and pipeline_total(lines) (sum of valid amounts). Empty list → 0.0.

Difficulty: beginner

Back to lesson: Checkpoint: Architecture