如果我嘗試下面的查詢序言中,我發現了一個錯誤...爲什麼在嘗試使用濃時在Prolog中出現錯誤?
Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 6.4.1)
Copyright (c) 1990-2013 University of Amsterdam, VU Amsterdam
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.
?- conc([a,b], [c,d], [a,b,c,d]).
ERROR: toplevel: Undefined procedure: conc/3 (DWIM could not correct goal)
這是因爲我不符合事實和規則一個單獨的文件加載?因爲這看起來很奇怪。下一個查詢例如確實有效:
?- member(apple, [apple, broccoli, crackers]).
true .
使用append而不是conc – joel76
你從哪裏得到'conc'是SWI Prolog內置謂詞的想法? – lurker
我正在閱讀Bratko的「Prolog Programming for Artificial Intelligence」,在我看來,conc是內置的東西。也許我必須重新閱讀關於conc的部分... –