Practice · 1 of 3
Folds That Survive Empty Packs
CHALLENGE
Difficulty: advanced+25 XP
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.
Press Submit to check your solution.
Back to lesson: Practice: Packs and Folds