To request the solution of multiple goals, use: (and < goal1 > ... < goalN >)
(and <
> ... <
>)
For example:
|==> (and (member ?x (2 3)) (append (?x) (foo) ?y))
|
|X = 2
|Y = (2 FOO)
|OK.
|==>
KnowledgeWorks and Prolog User Guide (Unix version) - 6 Dec 2011