Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Prolog > SQL

Name: Anonymous 2018-10-09 22:09

This is a fact of life.

Name: Anonymous 2018-10-10 19:59

>>9
Here, Prolog is a language based on the first order logic unification algorithm.
Lowercase things are atoms while things that start with a capital are like variables.
gay(nikita).
gay(forzenvoid).
gay(mentifex).

Query: -? gay(cudder).
false.
-? gay(nikita).
true.


iq(nikita, 60).
iq(forzenvoid, 5).
iq(mentifex, 196).

Query: -? iq(R, IQ), IQ >= 50.
R = nikita,
IQ = 60 ;
R = mentifex,
IQ = 196.


Since Prolog is Turing complete you can do all kinds of things that you can do in normal languages, for example: http://kti.ms.mff.cuni.cz/~bartak/prolog/sorting.html

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List