Something like this?

  equivalenceClosure = fix $ \f e ->
    let e' = reflexivity . symmetry . transitivity $ e
    in if e' == e then e else f e'

Cheers,

-- 
Felipe.

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to