Created
March 27, 2019 16:57
-
-
Save adolfont/e3c2047674dd6eea95eff828ca1fc51d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule LogicaClassicaProposicional do | |
def nao(:v), do: :f | |
def nao(:f), do: :v | |
def e(:v,:v), do: :v | |
def e(:f,_), do: :f | |
def e(_,:f), do: :f | |
def ou(:f,:f), do: :f | |
def ou(:v,_), do: :v | |
def ou(_,:v), do: :v | |
end | |
alias LogicaClassicaProposicional, as: LCP | |
IO.puts("não") | |
IO.inspect LCP.nao(:f) | |
IO.inspect LCP.nao(:v) | |
IO.puts "" | |
IO.puts("e") | |
IO.inspect LCP.e(:v,:v) | |
IO.inspect LCP.e(:v,:f) | |
IO.inspect LCP.e(:f,:v) | |
IO.inspect LCP.e(:f,:f) | |
IO.puts "" | |
IO.puts("ou") | |
IO.inspect LCP.ou(:v,:v) | |
IO.inspect LCP.ou(:v,:f) | |
IO.inspect LCP.ou(:f,:v) | |
IO.inspect LCP.ou(:f,:f) | |
IO.puts "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment