Weirdly this is not covered in the examples or docs
let sum items =
when items is
[] -> 0
x :: xs -> x + (sum xs)
This part x :: xs
isn't right.
What should it be?
I believe it'd be [x, .. as xs]
!
That's the one! thanks
njlr has marked this topic as resolved.
Last updated: Jul 06 2025 at 12:14 UTC