This is a page from my book, Functional Programming, Simplified
With all of the images of the previous lesson firmly ingrained in your brain, let’s write a
sum function using recursion!
sum function signature
List of integers, such as this one:
val list = List(1, 2, 3, 4)
let’s start tackling the problem in the usual way, by thinking, “Write the function signature first.”