
6 Feb
2010
6 Feb
'10
8:17 a.m.
On Sat, Feb 06, 2010 at 11:12:40PM +1030, Mark Spezzano wrote:
-- Function: joinLines -- Joins the Words within Lines together with whitespace and newline characters -- Argument: Lines to pad with whitespace and newlines -- Evaluate: The processed and concatenated String joinLines :: [Line] -> String joinLines (l:[]) = concat (intersperse " " l) joinLines (l:ls) = (concat (intersperse " " l)) ++ ('\n':joinLines ls)
Why not just joinLines = unlines . map unwords This should be as fast as you may get using lists of lists of lists of Chars :). -- Felipe.