write a prolog predicate hasduplicatesl that is


Write a Prolog predicate has_duplicates(L) that is true if list L contains duplicated elements (that is at least 2 copies of an element). For instance:

?- has_duplicates([a,e,b,d,s,e]).

Yes

?- has_duplicates([a,b,d,s,e]).

No

?- has_duplicates([]).

No

 

Request for Solution File

Ask an Expert for Answer!!
Application Programming: write a prolog predicate hasduplicatesl that is
Reference No:- TGS0220121

Expected delivery within 24 Hours