
On Mon, May 16, 2011 at 09:07:25PM +0200, Christopher Done wrote:
On 16 May 2011 20:59, Magnus Therning
wrote: readJSON object = do obj <- readJSON object GlossDef <$> valFromObj "para" obj <*> valFromObj "GlossSeeAlso" obj
FWIW, read the first comment ;-)
I still consider the monadic style easier to read than the applicative so that's what I usually start with.
I was more referring to the fact that you're re-implementing valFromObj and needlessly pattern matching.
Indeed I am, thanks for pointing that out. /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus Perl is another example of filling a tiny, short-term need, and then being a real problem in the longer term. -- Alan Kay