[Haskell-cafe] Indentation Creep
ndmitchell at gmail.com
Fri Jul 13 17:19:33 EDT 2007
> In particular, I wrote a Trie implementation.
Neat, I often feel I should be using one of those, but never do
because Data.Map is just too temptingly close by.
A couple of the combinators can be used to simplify some bits:
> case v of
> Nothing -> return True
> Just _ -> return False
< isNothing v
> if e
> then writeTVar p Empty
> else return ()
< when e $ writeTVar p Empty
There all so seem to be some other common bits:
> case re of
> False -> writeTVar m Nothing
> True -> writeTVar p Empty
Perhaps that could become a function?
More information about the Haskell-Cafe