Add documentation and doctests for Cond.hs