myUnlines :: [String] -> String
myUnlines xs = foldr (addLine) "" xs
where addLine c acc = acc ++ c ++ "\n"
It’s pretty much straight down the path of exactly what folds are meant for, though the inferred types still managed to surprise me, and my initial implementation was about twice this size.