Structs
The following structs are available globally.
-
A statement whose
See moreheadis true given that itsbodyis true. When thebodyis empty, a clause is commonly called afact
. Otherwise, it is called arule
.Clauseis often used with unification variables such that conditional truths can be expressed, such asgrandparent(A, B) :- parent(A, X), parent(X, B).Declaration
Swift
public struct Clause<Atom: Hashable>
-
The data type used to represent atoms and compound terms. Takes the form
See morebarorfoo(bazz, buzz)for any arity. Note that an atom is just a special case of a compound term with 0 arguments.Declaration
Swift
public struct Term<Atom: Hashable>
-
A logic
See moreSystem, defined by a collection ofClauses, that provides a mechanism for querying to learn facts about the system.Declaration
Swift
public struct System<Atom: Hashable>
View on GitHub
Structs Reference