Home
Affiliated Colleges
Course content
First Sem
Second Sem
Third Sem
Fourth Sem
Fifth Sem
Sixth Sem
Seventh Sem
Eighth Sem
Lab report 4th sem
Contact
Sunday, March 14, 2010
ICS Lab: Duplicate the elements of the list
Duplicate the elements of the list
domains
int=integer
list_element=int*
predicates
duplicate(list_element,list_element)
clauses
duplicate([],[]).
duplicate([H|T],[H,H|L]) :- duplicate(T,L).
goal
duplicate([1,9,6],L).
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
^ Scroll to Top
^ Go to Top
No comments:
Post a Comment