hey guys, I am currently a noob to swi-prolog. I've been trying to figure out bunch of things and I was working on some questions in the beginner book I bought... I got stuck on some of them. I hope to get some help in here since this is one of the best ones I found.
I appreciate the help... Thanks
Code:
remove_duplicates(+List, -NewList)
Succeeds with NewList equal to List with all the duplicates in List removed, leaving just a single copy of each distinct element in List (the order in which the elements appear in NewList does not matter). If List is not a list, it fails.
delete_first(+X, +List, -NewList)
Succeeds with NewList equal to List, with the first occurrence of X in List deleted. If X does not occur in the list List, succeeds with NewList equal to List. If List is not a list, it fails.
I appreciate the help... Thanks