Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
これを変換する方法
fact( [a,b,c], [d,e,f], ..., [p, q, r] )
これらの要素のリストに?
結果:
[[a,b,c], [d,e,f], ..., [p, q, r]]
list_fact_args(Fact,List) :- Fact =.. [fact|List].
=..左の述語を、最初のメンバーとして述語名、後のメンバーとしてその引数を持つリストに変換する便利な述語です。または、左側の述語の右側のリスト。ここでfactは、「fact」という名前の述語のみがリストされていることを示しています。
=..
fact
Prolog マニュアルまたは教科書を入手して、検索してください =.. / 2.