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.
次のような単純な Prolog 述語が必要です。
make_list_elements_unique([1,1,1,2,2,3], X) (X = [1,2,3])。
自分で書き始める前に、組み込みの述語を探したいと思います。Prolog にそのような述語がないことを示唆することはできません。
あなたはそれを知っていますか?
これには、組み込みの述語sort/2を使用できます。
sort/2
そのための組み込みの述語 list_to_set/2 を見つけました!
非常にうまく動作します。