On 17 jan 2009, at 22:22, Derek Elkins wrote:
On Thu, 2009-01-15 at 13:40 +0100, Apfelmus, Heinrich wrote:
Eugene Kirpichov wrote:
Well, your program is not equivalent to the C++ version, since it
doesn't bail on incorrect input.
Oops. That's because my assertion
show . read = id
is
On Mon, 2009-01-19 at 22:12 -0500, S. Doaitse Swierstra wrote:
On 17 jan 2009, at 22:22, Derek Elkins wrote:
On Thu, 2009-01-15 at 13:40 +0100, Apfelmus, Heinrich wrote:
Eugene Kirpichov wrote:
Well, your program is not equivalent to the C++ version, since it
doesn't bail on incorrect
On Thu, 2009-01-15 at 13:40 +0100, Apfelmus, Heinrich wrote:
Eugene Kirpichov wrote:
Well, your program is not equivalent to the C++ version, since it
doesn't bail on incorrect input.
Oops. That's because my assertion
show . read = id
is wrong. We only have
read . show = id
Jonathan Cast wrote:
reverseDouble =
unlines
. intro
. map show
. reverse
. map (read :: String - Double)
. takeWhile (/= end)
. words
where
intro l =
(read ++ show (length l) ++ elements) :
elements in reversed
Well, your program is not equivalent to the C++ version, since it
doesn't bail on incorrect input.
2009/1/15 Apfelmus, Heinrich apfel...@quantentunnel.de:
Jonathan Cast wrote:
reverseDouble =
unlines
. intro
. map show
. reverse
. map (read :: String -
Eugene Kirpichov wrote:
Well, your program is not equivalent to the C++ version, since it
doesn't bail on incorrect input.
Oops. That's because my assertion
show . read = id
is wrong. We only have
read . show = id
show . read = id (in the less defined than sense)
Regards,
H.
Hello Eugene,
Thursday, January 15, 2009, 3:27:59 PM, you wrote:
but at least length.map show is eq to length :)
Well, your program is not equivalent to the C++ version, since it
doesn't bail on incorrect input.
2009/1/15 Apfelmus, Heinrich apfel...@quantentunnel.de:
Jonathan Cast wrote: