Ben Franksen
2017-10-15 19:10:20 UTC
Data.List claims:
unlines is an inverse operation to lines.
which I understand to mean
prop> unlines (lines s) = s
which is false in general. It should say
prop> unlines (lines s) = if last s == '\n' then s else s ++ "\n"
Cheers
Ben
unlines is an inverse operation to lines.
which I understand to mean
prop> unlines (lines s) = s
which is false in general. It should say
prop> unlines (lines s) = if last s == '\n' then s else s ++ "\n"
Cheers
Ben