Hi
this blog (below) is all about looping formulas
http://blogs.msdn.com/infopath/archive/2006/04/05/569338.aspx
David Airapetyan gives a great example of how to use the Eval function that returns data from a list of nodes without specifying the parent and the Concat function you are probably familiar with. Great article, short, informative and will do exactly what you are after and explain why.
Happy to help and thanks to David for the blog
Cheers