Skip to content
Browse files

Add a case to handle adding 0

  • Loading branch information...
1 parent 438c1d9 commit f90595939620e8039e561a3e448c2f165d711436 @yav committed Oct 27, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/Data/Integer/Presburger/Term.hs
View
1 src/Data/Integer/Presburger/Term.hs
@@ -118,6 +118,7 @@ k |*| T n m = T (k * n) (fmap (k *) m)
-- | Add a constant, a more efficient version of (+)
(|+|) :: Integer -> Term -> Term
+0 |+| t = t
k |+| T n m = T (k + n) m
-- | Get the coefficient of a term. Returns 0 if the variable does not occur.

0 comments on commit f905959

Please sign in to comment.
Something went wrong with that request. Please try again.