Permalink
Browse files

removed unused terms and leaves

  • Loading branch information...
1 parent d2e2c83 commit baf3eaec729a924771d308888c8b4cfbd623b457 @substack committed Feb 27, 2010
Showing with 1 addition and 8 deletions.
  1. +1 −8 lib/MathObj/Polynomial/Builder.hs
@@ -1,6 +1,5 @@
module MathObj.Polynomial.Builder (
- Expression(..),
- -- subs, visit, inTermsOf
+ Expression(..), subs
) where
{-
@@ -133,12 +132,6 @@ visit f expr = visit' f $ f expr where
visit' f e@Exp{} = Exp (visit' f x) n where Exp x n = f e
visit' f x = f x
-terms :: Expression a -> [Expression a]
-terms x = x : (concatMap terms $ subterms x)
-
-leaves :: Expression a -> [Expression a]
-leaves = filter ((== 0) . length . subterms) . terms
-
subterms :: Expression a -> [Expression a]
subterms (Add xs) = xs
subterms (Mul xs) = xs

0 comments on commit baf3eae

Please sign in to comment.