I’ve encountered the infomral definition of foldr in a couple of books.
I’ve attached an image from Bird and Wadler’s “Introduction to Functional Programming” (1988), but I’ve seen the same informal definition in Hutton’s “Programming in Haskell” (2nd ed).
In the image attached I’m referring to the 1st and 3rd lines, and what puzzles me is why is there an ellipsis (the 3 dots) to the right of (f x_n a) in the 1st line, or to the right of (x_n # a) in the 3rd line (I’m using ‘#’ in place of the operator that has a circle with a ‘+’ in it).
If we look at the last 4 lines of the image attached we can see that after the operator is applied to the initial value ‘a’ then all there is to the right are the terminating closing parentheses.
This is a a question about functional programming, which is why I’m posting it in “Software Engineering Stack Exchange” rather than in “Math Exchange”. However, I was in need of some math formatting (such as the circle with a ‘+’ in it, or ‘x’ with a subscript ‘n’) – is there a way to do that in “Software Engineering Stack Exchange”? Should I have posted it elsewhere?