I am currently working through the Introduction to programming using SML book released back in 1999. I would like your help on how to declare a recursive function for exercise 1.3, which I have been stuck on for some time now.
1.3: Declare a recursive function f: int -> int, where f(ᶯ) = 1 + 2 + ... + (ᶯ - 1) + ᶯ for ᶯ ≥ 0
Hint: Use two clauses with 0 and ᶯ as argument patterns. State the recursion formula corresponding to the declaration.
If anyone can provide some guidance on this that would be great.