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 (Windows version) - 24 Mar 2017