< Prolog
This section gives guidelines and tips on reading and writing prolog code, and how to think about prolog code in general.
Examples
fac(0,1).
fac(A,B) :- A > 0, C is A-1, fac(C,D), B is A*D.
Exercises
previous: Cuts and Negation next: Difference Lists
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.