diff --git a/Math/MFSolve.hs b/Math/MFSolve.hs
--- a/Math/MFSolve.hs
+++ b/Math/MFSolve.hs
@@ -81,7 +81,8 @@
         SimpleExpr(..), Expr, LinExpr(..), UnaryOp(..), BinaryOp(..),
         SimpleVar(..),
         makeVariable,
-        makeConstant, evalExpr, fromSimple, toSimple, evalSimple, hasVar, 
+        makeConstant, evalExpr, fromSimple, toSimple, evalSimple, hasVar,
+        mapSimple, mapExpr,
         -- * Dependencies
         Dependencies, DepError(..), 
         noDeps, addEquation, eliminate,
@@ -104,7 +105,6 @@
 import Control.Monad.Reader
 import Control.Monad.Writer
 import Control.Monad.Identity
-import Control.Monad.RWS
 import Control.Monad.Cont
 import Control.Exception
 import Data.Typeable
@@ -412,6 +412,20 @@
 evalSimple g s (SEUn f e) =
   evalUn f (evalSimple g s e)
 
+-- | map a simple expression using the given substitution.
+mapSimple :: (Floating m, Floating n) => (n -> m) -> (v -> u) -> SimpleExpr v n -> SimpleExpr u m
+mapSimple _ g (Var v) = Var (g v)
+mapSimple f _ (Const c) = Const (f c)
+mapSimple f g (SEBin h e1 e2) =
+  SEBin h (mapSimple f g e1) (mapSimple f g e2)
+mapSimple f g (SEUn h e) =
+  SEUn h (mapSimple f g e)
+
+-- | map an expression using the given substitution.
+mapExpr :: (Floating m, Floating n, Ord u, Ord v, Eq n, Ord m) =>
+           (n -> m) -> (v -> u) -> Expr v n -> Expr u m
+mapExpr f g = fromSimple . mapSimple f g . toSimple
+
 -- | Make a expression from a simple expression.
 fromSimple :: (Floating n, Ord n, Ord v) => SimpleExpr v n -> Expr v n
 fromSimple = evalSimple makeConstant makeVariable
@@ -1025,15 +1039,20 @@
           RealFrac n, Floating n, Ord v) =>
          (Expr v n, Expr v n) -> (Expr v n, Expr v n) -> m ()
 (=&=) (a, b) (c, d) =
-  do ignore $ a === c
-     b === d
+  do catchError (a === c) $ \e ->
+       case e of
+        RedundantEq ->
+          b === d
+        _ -> throwError e
+     ignore $ b === d
 
 -- | Succeed even when trowing a `RedundantEq` error.
 ignore :: MonadError (DepError v n) m => m () -> m ()
-ignore m = m `catchError` (
-  \e -> case e of
-         RedundantEq -> return ()
-         _ -> throwError e)
+ignore m =
+  catchError m $ \e ->
+  case e of
+   RedundantEq -> return ()
+   _ -> throwError e
 
 -- | run the solver.
 runSolver :: MFSolver v n a -> Dependencies v n -> Either (DepError v n) (a, Dependencies v n)
diff --git a/mfsolve.cabal b/mfsolve.cabal
--- a/mfsolve.cabal
+++ b/mfsolve.cabal
@@ -1,5 +1,5 @@
 Name:		mfsolve
-Version: 	0.3.0
+Version: 	0.3.1.0
 Synopsis:	Equation solver and calculator à la metafont
 Category: 	Math
 Copyright: 	Kristof Bastiaensen (2015)
