Write a prolog predicate has duplicates, Programming Languages

Assignment Help:

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

 


Related Discussions:- Write a prolog predicate has duplicates

Assignment, Assignment for Networing&camunication

Assignment for Networing&camunication

Design an application that opens and analyses word files, Design an applica...

Design an application that opens and analyses word files. Requirements: Create an application that analyses text documents. It should open a text file, read each word in

Visual basic.net, how to create a screen for messages for a data transmissi...

how to create a screen for messages for a data transmission system

C# xna game project, I need to finish my game project within two weeks usin...

I need to finish my game project within two weeks using XNA. Would you guys can help me to finish it? Thank you

No Linux Audible, Why no Audible support for Linux? Maybe they should use a...

Why no Audible support for Linux? Maybe they should use a browser interface?

Java help, I have a half done program that needs to be finished for a class...

I have a half done program that needs to be finished for a class by tomorrow night. The program will create a database and print out a menu ofoptions (already done). Ive already

Apply generic algorithms in solving programming problems, Educational Objec...

Educational Objectives: After completing this assignment, the student should be able to accomplish the following: Apply generic algorithms in solving programming problems Define an

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd