Course · Section 10: A Closer Look at Functions · Lecture 137: First-Class and Higher-Order Functions
Implement `sumTo(n)` returning `1 + 2 + ... + n` using recursion, with `sumTo(0) = 0`.
+ 1 hidden test run on Submit.
Each call adds n to the sum of everything below it, bottoming out at 0.
Run your code to see results.