simplify' :: Expr -> Expr -> (Expr -> Expr -> Expr) -> Expr
  simplify' a b expr =
    let (sa, sb) = (simplify a, simplify b)
    in  if (sa /= a || sb /= b) then simplify $ expr sa sb else expr a b
simplify' :: Expr -> Expr -> (Expr -> Expr -> Expr) -> Expr
simplify' a b expr =
    let (sa, sb) = (simplify a, simplify b)
    in  if (sa /= a || sb /= b) then simplify $ expr sa sb else expr a b
simplify' a b expr =
    let (sa, sb) = (simplify a, simplify b)
    in  if (sa /= a || sb /= b) then simplify $ expr sa sb else expr a b