Q1. [15 Points] Write a Prolog predicate makeset (L1, L2) that takes list L1 of integers and
removes the repeating elements. The result is returned in list L2. For example.
makeset ([1,3,4,1,3, 91, Set). would return [1, 3, 4, 9]
Q2. [15 Points]
Copyright By PowCoder代写 加微信 powcoder
triple (x, XXX) :- append (X, X, XX), append (XX, x, XXX).
The rule above checks if X triples into XXX. For example, if X=[1,2,3], this will produce [1, 2, 3
1. 2. 3. 1. 2. 31 in XXX
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com