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

Developing a preprocessor for java, How and where to start to develop a pre...

How and where to start to develop a preprocessor for java

Program to translate a sentence , a) Write a program i_language(Sentence,N...

a) Write a program i_language(Sentence,NewSentence) that translates a sentence to the i-language. In this language all vowels are changed to i and all other characters are kep

Triple eigenvalue with one eigenvector, Triple Eigenvalue with 1 Eigenvecto...

Triple Eigenvalue with 1 Eigenvector The eigenvalue/vector pair in this case are l and  ?h , . Since the eigenvalue is real we know as the first solution we require is, e l

Lunix, showing work Ubuntu system or either opensuse

showing work Ubuntu system or either opensuse

Language processors, explain steps of program execution in language process...

explain steps of program execution in language processors

Access modifiers, Access Modifiers Convenience Modifiers or we can say (Acc...

Access Modifiers Convenience Modifiers or we can say (Access Specifies) identifies as the opportunity of accessibility of an Item and its associates. All C# kinds and kind associat

.net windows services, .NET Windows Services But Enthusiasm has an amazi...

.NET Windows Services But Enthusiasm has an amazing record of beginning overdue but finding up easily. This is real in situation of .NET too. Enthusiasm put their best men at

Assignment, Assignment for Networing&camunication

Assignment for Networing&camunication

Algorithm of sort the given array remove the repeated value, Short Arrays: ...

Short Arrays: Array = randi(10,1,randi(6,1,1)+4)-5 This command will generate an array which you should be able to evaluate by hand (and also have your code evaluate for te

Write a perl script that accepts two integer arguments, 1. Write a Perl scr...

1. Write a Perl script that accepts exactly 2 integer arguments where the first argument must be less than the second argument. The script will print a comma separated list of inte

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