Skip to content

Instantly share code, notes, and snippets.

@5outh
Created November 13, 2013 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 5outh/7456295 to your computer and use it in GitHub Desktop.
Save 5outh/7456295 to your computer and use it in GitHub Desktop.
not :: Expr -> Expr
not (Not e) = e
not (And e1 e2) = Or (not e1) (not e2)
not (Or e1 e2) = And (not e1) (not e2)
not (SubExpr e) = not e
not (Var c) = Not (Var c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment