diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,5 +1,9 @@
 # Change Log
 
+## 0.3.1
+
+* Utility for extracting constants from expressions
+
 ## 0.3
 
 * Cleanup, GHC 8.6
diff --git a/expressions.cabal b/expressions.cabal
--- a/expressions.cabal
+++ b/expressions.cabal
@@ -1,5 +1,5 @@
 name:                expressions
-version:             0.3
+version:             0.3.1
 synopsis:            Expressions and Formulae a la carte
 description:
   This package is aimed at providing means of fixing a first-order language and
diff --git a/src/Data/Expression.hs b/src/Data/Expression.hs
--- a/src/Data/Expression.hs
+++ b/src/Data/Expression.hs
@@ -703,7 +703,7 @@
     not' (Not a) = return . dual . unIFix $ a
 
 freename :: forall f (s :: Sort). ( VarF :<: f, IFunctor f, IFoldable f ) => IFix f s -> String
-freename a = head . tail $ dropWhile (\s -> any (>= s) ns) pool where
+freename a = head $ dropWhile (\s -> any (>= s) ns) pool where
     fs = vars a
     ns = sort $ map (\(DynamicallySorted _ (IFix (Var n _))) -> takeWhile (`elem` ['a'..'z']) n) fs
 
diff --git a/src/Data/Expression/Arithmetic.hs b/src/Data/Expression/Arithmetic.hs
--- a/src/Data/Expression/Arithmetic.hs
+++ b/src/Data/Expression/Arithmetic.hs
@@ -19,6 +19,7 @@
 
 module Data.Expression.Arithmetic ( ArithmeticF(..)
                                   , cnst
+                                  , cnsts
                                   , add
                                   , mul
                                   , (.+.)
@@ -149,6 +150,14 @@
 -- | A smart constructor for integer constants
 cnst :: ArithmeticF :<: f => Int -> IFix f 'IntegralSort
 cnst = inject . Const
+
+-- | Collects a list of all constants occurring in an expression.
+cnsts :: forall f (s :: Sort). ( ArithmeticF :<: f, IFoldable f, IFunctor f, IEq1 f ) => IFix f s -> [IFix f 'IntegralSort]
+cnsts = nub . F.getConst . icata cnsts' where
+    cnsts' :: forall (s' :: Sort). f (F.Const [IFix f 'IntegralSort]) s' -> F.Const [IFix f 'IntegralSort] s'
+    cnsts' a = case prj a of
+        Just (Const c) -> F.Const [cnst c]
+        _              -> ifold a
 
 mergeConstAdd :: ArithmeticF :<: f => IFix f 'IntegralSort -> (Int, [IFix f 'IntegralSort]) -> (Int, [IFix f 'IntegralSort])
 mergeConstAdd e (acc, r) = case match e of
