Skip to content

Commit

Permalink
flipped arguments to substitute
Browse files Browse the repository at this point in the history
  • Loading branch information
ekmett committed Jul 12, 2012
1 parent 27a334b commit bbe306f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bound.cabal
@@ -1,6 +1,6 @@
name: bound
category: Language, Compilers/Interpreters
version: 0.3.2
version: 0.4
license: BSD3
cabal-version: >= 1.9.2
license-file: LICENSE
Expand Down
6 changes: 3 additions & 3 deletions src/Bound/Term.hs
Expand Up @@ -19,9 +19,9 @@ import Data.Foldable
import Data.Traversable
import Prelude hiding (all)

-- | @'substitute' p a w@ replaces the free variable @a@ with @p@ in @w@
substitute :: (Monad f, Eq a) => f a -> a -> f a -> f a
substitute p a w = w >>= \b -> if a == b then p else return b
-- | @'substitute' a p w@ replaces the free variable @a@ with @p@ in @w@
substitute :: (Monad f, Eq a) => a -> f a -> f a -> f a
substitute a p w = w >>= \b -> if a == b then p else return b
{-# INLINE substitute #-}

-- | If a term has no free variables, you can freely change the type of
Expand Down

0 comments on commit bbe306f

Please sign in to comment.