Skip to content

Instantly share code, notes, and snippets.

@m1el
Last active August 29, 2015 14:04
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 m1el/79486197ad786fd71eae to your computer and use it in GitHub Desktop.
Save m1el/79486197ad786fd71eae to your computer and use it in GitHub Desktop.
a ~> b = not (a && not b)
truthTable3 fn = do
a <- [False, True]
b <- [False, True]
c <- [False, True]
return $ fn a b c
f8b p q r = not((p && not q) || r) == (r ~> q)
f8c p q r = not (p ~> q) ~> (q ~> r)
main = print $ truthTable3 f8b
@thaiviet1994
Copy link

Creating a “truth table” is not hard, you can use an useful tool (CKod, at http://ckod.sourceforge.net/_/) to make a “truth table”.

  1. CKod homepage: http://ckod.sourceforge.net/
  2. CKod online: http://ckod.sourceforge.net/_/
  3. CKod forum: http://ckod.sourceforge.net/~/

Good luck to you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment