# Unclear as to the informal definition of foldr

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.

Many thanks, Sarel

P.S. 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?

• The right ellipsis probably represents the extra parens ))) that would be inserted. Don't overthink this. – amon Oct 9 at 8:05
• To answer your PS: Proper math formatting is too rarely needed here that MathJax is not supported on SE.se. Subscripts can be achieved with the HTML <sub> tag and for other symbols you would need to resort to inserting Unicode characters. But your post is perfectly understandable without the proper math formatting. – Bart van Ingen Schenau Oct 9 at 10:18
• @BartvanIngenSchenau: Not without the image, it isn't. Questions really should be understandable without images. – Jörg W Mittag Oct 9 at 10:20
• @JörgWMittag: Considering that the question was regarding something written in a textbook (and the image was taken from the textbook), how would you recommend my doing this better next time? I imagine it would be a hassle to replicate the expression I had a problem with in text form (as it was more mathematically oriented, and MathJax is not supported on SE.se, as Bart van Ingen Schenau kindly pointed out). I'm actually interested if there's a (relatively) hassle-free way of asking my question in text form, without relying on the image from clarity. – Sarel Oct 10 at 10:32