Skip to content

Commit

Permalink
Fix example code for interpret function.
Browse files Browse the repository at this point in the history
  • Loading branch information
beastaugh committed Dec 17, 2012
1 parent 6f09ecf commit c727cba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Data/Logic/Propositional/Core.hs
Expand Up @@ -70,8 +70,8 @@ type Mapping = Map Var Bool
-- expression below would evaluate to @False@.
--
-- > interpret
-- > (Conjunction (Variable "A") (Variable "B"))
-- > (fromList [("A", True), ("B", False)])
-- > (Conjunction (Variable $ Var 'a') (Variable $ Var 'b'))
-- > (fromList [(Var 'a', True), (Var 'b', False)])
interpret :: Expr -> Mapping -> Bool
interpret (Variable v) vs = fromMaybe False (lookup v vs)
interpret (Negation expr) vs = not $ interpret expr vs
Expand Down

0 comments on commit c727cba

Please sign in to comment.