gt; seems to make sense, but looking at it's definition in Prelude I really
> > can't see why it's useful.
> >
> > Yitz gave me the code;
> >
> > fmap (runGet $ readNames n) $ L.hGetContents h
> >
> > So can I rewrite this without the $ like this?
&
really can't see why it's
useful.
Yitz gave me the code;
fmap (runGet $ readNames n) $ L.hGetContents h
So can I rewrite this without the $ like this?
fmap (runGet (readNames n)) (L.hGetContents h)
Is there any additional benefit to using $ than just not having to wr
e (memory
footprint, speed of execution, etc) does "carrying around the IO monad" make
much of a difference?
You're right. I don't need to pull the [String] out of the IO monad.
Suprise, suprise, the general pattern is appropriate in my c
he stream, no further IO is
necessary, so any other function should be able to just use the list and not
worry about the IO stuff.
Again my questions are, Is this an okay thing to do, or is my design/idea
very, very wrong?
Thanks again for the help,
Tom
On Thu, Jul 1, 2010 at 1:53 PM, Stephen Te