Recursively sum a list.
Define a function rsum(xs) that returns the sum of a list using recursion (no loops, no built-in sum). Then read space-separated ints from stdin and print rsum applied to them.
Test input: 1 2 3 4 5
Expected output: 15
Sign in to save your code and track progress across devices.