HomeChallengesRepsProblemsLeaderboardTake a challenge

Small steps, joined up

One function doing four jobs, none of which can be tested alone.

Intermediate15 min on the clock4 graded checks · 100 pointsFunctions as Values
Graded by running your code against real cases.

What you build

  • Write pipe(...fns), applying left to right
  • Make pipe() with no arguments return its input unchanged
  • Export normalise, onlyActive and withTotals as separate functions
  • Rebuild summarise as a pipeline of those three

Done means

pipe composes left to right, each step works standalone, and the pipeline gives the original answer.

How it is graded

Published in full, before you start — every point is one of these and there is nothing else. Each one runs your code; it is not a search for keywords.

  1. pipe applies left to right+25Small steps, joined up
  2. pipe with no steps returns its input+15Small steps, joined up
  3. Each step works on its own+30Small steps, joined up
  4. The pipeline gives the original answer+30Small steps, joined up

What it teaches

Small steps, joined upintermediate

Four small transformations joined by a pipeline can each be tested alone; the same four welded into one loop can only be tested together, and only through their output.

The rest of Functions as Values