Next Prev Up Top Contents Index

A.4.3 Definitions

It is possible to type logic definitions directly into the interpreter. The resulting Lisp code will be compiled in memory and you may use the definition immediately, for example.:

|==> (defrel color
|      ((color red))
|      ((color blue))
|      ((color green)))
|
|<... various compilation messages ...>
|
|YES.
|OK.
|
|==> (color ?x)
|
|?X = RED

LispWorks KnowledgeWorks and Prolog User Guide - 14 Dec 2001

Next Prev Up Top Contents Index