
(deflogfun break-up (y) (append ?a ?b y) (?a ?b)) (break-up '(foo bar baz))(NIL (FOO BAR BAZ))
T
(break-up '(foo bar baz) :all :values)(NIL (FOO BAR BAZ))
((FOO) (BAR BAZ))
((FOO BAR) (BAZ))
((FOO BAR BAZ) NIL)
(break-up '(foo bar baz) :all :list)((NIL (FOO BAR BAZ))
((FOO) (BAR BAZ))
((FOO BAR) (BAZ))
((FOO BAR BAZ) NIL))
T
A final interface mechanism is with-prolog. with-prolog allows one to embed prolog into an arbitrary lisp function. Lisp variables are referenced in Prolog using " ?.< name > ".