此 showName 查询将给出一组名称:
?- showName(SName,Fname).
SName = 'McBrien',
FName = 'Alex' ;
SName = 'Gardner',
FName = 'Daniel' ;
SName = 'Phillips',
FName = 'Abbas' ;
SName = 'Pietzuch',
FName = 'Paul'
and so on as I keep pressing ; it will gives more names.
我需要编写另一个名为
nameList (List). %which will put all names by query showName into List as a tuple
((SName1,FName1),(SName2,FName2), ... )
我想在不使用 Prolog 库(列表)的情况下尝试它。谢谢..