Hello! My question concerns a general term datatype: data Term = Not Term | Term :&&: Term | Term :||: Term | Literal Char
Is it somehow possible to write a generic function that applies the associativity rules on a "Term" (by using pattern matching) and works with both data constructors or is it necessary to write one for :&&: and :||: ? Something like: assoc :: Term -> Term assoc ((t1 `op` t2) `op` t3) = .... -- this doesn't work Regards, Peter _______________________________________________ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
