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

I need engineer with good knowledge of assembly x86 language, I need an eff...

I need an efficient and fast reverse engineer with good knowledge of assembly x86 language, strong reverse engineering skills, IDA Pro (Hex-Rays) to Linux game routine, C, C++ prog

Java, wat is- m=5; n=3; x=m++-n+++m;

wat is- m=5; n=3; x=m++-n+++m;

Write the vhdl code for traffic light controller, The schematic of the traf...

The schematic of the traffic light controller is as shown in figure 1. There are three control buttons on the panel: HAZ (Hazard), LT (Left) and RT (Right). Whenever, HAZ is clicke

Develop a socket program in unix, Develop a socket program in UNIX/Linux th...

Develop a socket program in UNIX/Linux that uses (i) TCP as the transport protocol and  (ii) UDP as the transport protocol for transferring  a short message between a client and  s

Recursive decent parser, Given grammar Grammar M following: 1 - - > b...

Given grammar Grammar M following: 1 - - > begin end 2 - - > 3 - - > 4 - - > ? 5 - - > Id : = ; 6 - - > read ( ) ; 7 - - > write ( )

Visual logic, how much it will cost? i need learn how to make rightsided tr...

how much it will cost? i need learn how to make rightsided triangle in forloop

Computer education , #question.what. is cai? Explain its pitfalls .o

#question.what. is cai? Explain its pitfalls .o

Improved support for javascript debugging, Improved Support for JavaScript ...

Improved Support for JavaScript Debugging ASP.NET has many benefits over vintage ASP in the place of debugging. You can now quickly debug your server-side value using the complete

Program that will allow to print grade list of student, We want a program t...

We want a program that will allow us to print a "grade list" of the students in a class. The program should loop, asking for a name, midterm score, and final score. It should th

Formulas, how do I change a existing formula with a new formula and it show...

how do I change a existing formula with a new formula and it show the result

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