documentation bug in base

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

documentation bug in base

Ben Franksen
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"


Libraries mailing list
[hidden email]