Documentation

Note that there is no reference implementation for ISO Prolog, so we've used the following documents as references:

- Prolog Standard by M. A. Covington
- ISO directives, control constructs and builtins by J. P. E. Hodgson
- ISO Prolog Conformity Testing by U. Neumerkel

We are working on! Some pages may not be available yet (links colored in red).

**A simple tutorial**[english, spanish]**Prototypes and Prolog objects**[english, spanish]**Compilation and development of modules**[english, spanish]**Higher-order predicates**[english, spanish]**Manipulating the DOM with Prolog**[english, spanish]

- Likes – This snippet uses Prolog code to extract information of a Prolog database, and then uses JavaScript to add the results to this same page by modifying the DOM.

- !/0 – Cut.
- ,/2 – Conjunction.
- ->/2 – If-Then.
- ;/2 – Disjunction.
- call/1 – Invoke a callable term as a goal.
- catch/3 – Enable recovery from exceptions.
- fail/0 – Always fail.
- throw/1 – Raise an exception.
- true/0 – Always succeed.

- =/2 – Unification.
- unify_with_occurs_check/2 – Check if two terms are unifiable.
- \=/2 – Not unification.

- abolish/1 – Remove all the clauses of a predicate.
- asserta/1 – Add term to the Prolog database.
- assertz/1 – Add term to the Prolog database.
- retract/1 – Delete term from Prolog database.

- clause/2 – Check the existence of rules.
- current_predicate/1 – Check the existence of predicates.

- =../2 – Check the descomposition of a term.
- arg/3 – Check the argument of a term in the nth position.
- copy_term/2 – Copy one term without bounding the variables on it.
- functor/3 – Check characteristics of a term.

- ==/2 – Term identical.
- @</2 – Term less than.
- @=</2 – Term less than or equal to.
- @>/2 – Term greater than.
- @>=/2 – Term greater than or equal to.
- \==/2 – Term not identical.

- atom/1 – Check if atom.
- atomic/1 – Check if atom, integer or float.
- compound/1 – Check if compound.
- float/1 – Check if float.
- integer/1 – Check if integer.
- nonvar/1 – Check if not variable.
- number/1 – Check if integer or float.
- var/1 – Check if variable.

- atom_chars/2 – Express an atom as a list of one character atoms.
- atom_codes/2 – Express an atom as a list of character codes.
- atom_concat/3 – Concatenate characters.
- atom_length/2 – Length of an atom.
- char_code/2 – Character code of an atom.
- number_chars/2 – Express a number as a list of one character atoms.
- number_codes/2 – Express a number as a list of number codes.
- sub_atom/5 – Look for subatoms inside an atom.

- bagof/3 – Find all the values that would make a goal succeed and structure them.
- findall/3 – Find all the values that would make a goal succeed.
- setof/3 – Find all the values that would make a goal succeed and organize and order them.

- is/2 – Evaluate expression.

- </2 – Arithmetic less than.
- =:=/2 – Arithmetic equal.
- =</2 – Arithmetic less than or equal to.
- =\=/2 – Arithmetic not equal.
- >/2 – Arithmetic greater than.
- >=/2 – Arithmetic greater than or equal to.

- current_prolog_flag/2 – Check prolog flag and flag values.
- halt/0 – Terminate a Prolog processor.
- halt/1 – Terminate a Prolog processor and return message.
- set_prolog_flag/2 – Set value of flag.

- current_op/3 – Check properties of operator.
- op/3 – Alter the operator table.

`:- use_module(library(lists)).`

- append/3 – Join two lists.
- drop/3 – Drop the first elements of a list.
- exclude/3 –
- filter/3 – Filter elements for which a goal succeeds.
- foldl/4 – Reduce list to a single value.
- include/3 – Filter elements for which a goal succeeds.
- last/2 – Last element of a list.
- length/2 – Length of a list.
- map/3 – Apply goal to the elements of a list.
- maplist/3 – Apply goal to the elements of a list.
- max_list/2 – Largest element of a list.
- member/2 – Check membership of element in list.
- min_list/2 – Smallest element of a list.
- nth0/3 – Get the Nth element of a list.
- nth0/4 – Get the Nth element of a list and the rest of elements on it.
- nth1/3 – Get the Nth element of a list.
- nth1/4 – Get the Nth element of a list and the rest of elements on it.
- permutation/2 – Permutation of list.
- prod_list/2 – Product of the elements of a list.
- reduce/4 – Reduce list to a single value.
- replicate/3 – Generate list by replicating an element.
- reverse/2 – Invert the order of the elements in a list.
- sort/2 – Checks standard order.
- take/3 – Retrieve first elements of a list.

`:- use_module(library(random)).`

- maybe/0 – Succeed or fail randomly.
- maybe/1 – Succeed or fail with a certain probability.
- random/1 – Generate random value.
- random/3 – Generate random value in a range.
- random_between/3 –
- random_member/2 –
- random_permutation/2 – Rearrange list randomly.