Name: Anonymous 2018-10-09 22:09
This is a fact of life.
Where can I learn more about Prolog?
gay(nikita).
gay(forzenvoid).
gay(mentifex).-? gay(cudder).
false.
-? gay(nikita).
true.iq(nikita, 60).
iq(forzenvoid, 5).
iq(mentifex, 196).-? iq(R, IQ), IQ >= 50.
R = nikita,
IQ = 60 ;
R = mentifex,
IQ = 196.Lowercase things are atoms while things that start with a capital are like variables.Just like in Erlang (Erlang probably took this and pattern matching from Prolog)
http://kti.ms.mff.cuni.cz/~bartak/prolog/sorting.htmlDefinitely looks like Erlang or Haskell.
-? iq(R, IQ), gay(R), IQ <= 10.
R = frozenvoid
IQ = 5. Also, you can do things like -? iq(R, IQ), gay(R), IQ <= 10.
R = frozenvoid
IQ = 5.
>iq(mentifex, 196).
I never realized he was such a genius.