I found this code snipped on the internet:
digits 0 = [0]
digits n = digits' n []
where digits' 0 ds = ds
digits' n ds = let (q,r) = quotRem n 10
in digits' q (r:ds)
sumOfDigits = sum . digits
Can someone quickly explain what the " ' " sign ( digits n = digits' n []
) after the recursive function call is for? I've seen some other code examples in Haskell (tutorials), but im not understandig this one. A quick explanation is appreciated.