Hi

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

becomes:

<   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?

Thanks

Neil
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to