Re: unlines: the mystery of the trailing \n

2000-08-07 Thread Brian Boutel
Here is a concern: At present, a final \n in lines' input is optional, because a line is ended by either a \n or the end of the string. Consequently lines "a" and lines "a\n" have the same value ( ["a"] ). This seems a desirable feature that is worth preserving. Consider the composition

RE: unlines: the mystery of the trailing \n

2000-08-07 Thread Mark P Jones
Hi Sigbjorn, | Here's a Prelude inconsistency that's been irking me once | in a while for a loong time - today it came up again, so here goes: | | unlines ["a","b"] == "a\nb\n" | unwords ["a","b"] == "a b" | | [... unwords adds space between items, not at the beginning or end; |