Practical chapter 03 · guided challenge · 4 test cases per challenge
Decisions over collections
Combine universal, existential, filtering, and transformation macros in one rule.
01Valid and high-value itemsValidate every item while finding at least one high-value item.Solve challenge02One primary approverVerify that exactly one active primary approver exists.Solve challenge03No invalid itemsBuild an error list with filter() and verify that it is empty.Solve challenge04All orders under a limitTransform orders into decisions and then verify all results.Solve challenge