Question: Write a PROLOG program that includes the following operations with lists: membership testing (is an element member of a list?) first element last element two

Write a PROLOG program that includes the following operations with lists: membership testing (is an element member of a list?) first element last element two adjacent elements three adjacent elements append list1 to list2 producing list3 delete element from a list append element to a list insert element in a list compute the length of list reverse a list check whether a list is a palindrome display a list For each of these operations write your implementation of the operation and show an example of its use. If a predicate already exists (predefined in Prolog), modify its name (e.g. myappend or append 1). Lists to be processed can be created by an auxiliary program, defined as facts, or entered from the keyboard
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
