I did s.split("\n\n").fold... But this was first thing in the morning and where I lost time was that what I actually did at first was: s.split("/n/n")