better unfold.

This commit is contained in:
Kazu Yamamoto 2010-03-11 19:12:15 +09:00
parent 1e445097b7
commit 36fee672f3

View File

@ -22,4 +22,4 @@ unfoldLines p = drop 1 . unfold
unfold [] = "\n"
unfold (l:ls)
| p l = ('\n':l) ++ unfold ls
| otherwise = l ++ " " ++ unfold ls
| otherwise = (' ' :l) ++ unfold ls