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 lines.u

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; | unl

Re: unlines: the mystery of the trailing \n

2000-08-08 Thread Marcin 'Qrczak' Kowalczyk
Mon, 7 Aug 2000 17:58:40 -0700, Sigbjorn Finne <[EMAIL PROTECTED]> pisze: > 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" IMHO it should

RE: unlines: the mystery of the trailing \n

2000-08-08 Thread Sigbjorn Finne
Mark P Jones <[EMAIL PROTECTED]> writes: > > | 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 bet