Skip to main content

Practice ยท 1 of 3

Folds That Survive Empty Packs

Implement sumAll and sumSquares as one-line folds. The empty-pack calls in the tests are the graded trap: a unary fold over an empty pack is ill-formed โ€” use a binary fold.

Difficulty: advanced

Back to lesson: Practice: Packs and Folds