In people's responses to my serialization questions, I've seen them using $.
I didn't know what it was so I've looked it up. Can someone please confirm my understanding of what it does, please?
According to
http://en.wikibooks.org/wiki/Haskell/Practical_monads, after the second code sample in the "Return Values" section, it seems to suggest that $ is only used to avoid using so many brackets. Which 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?
fmap (runGet (readNames n)) (L.hGetContents h)
Is there any additional benefit to using $ than just not having to write as many brackets?
Thanks,
Tom