Last modified on 20 August 2011, at 14:19

Prolog/Reading and Writing code

This section gives guidelines and tips on reading and writing prolog code, and how to think about prolog code in general.

ExamplesEdit

fac(0,1).

fac(A,B) :- A > 0, C is A-1, fac(C,D), B is A*D.

ExercisesEdit


previous: Cuts and Negation next: Difference Lists