Question: 1-Write a prolog program to get a list and returns a list that has only the first two element and the last element of
1-Write a prolog program to get a list and returns a list that has only the first two element and the last element of the original list For example ?-delements([a, [b, [c], d], e, [], f], Q). Q = [a, [b, [c], d], f]] Please manually show the tracing model for the above example
Step by Step Solution
3.42 Rating (161 Votes )
There are 3 Steps involved in it
Heres a Prolog program that takes a list and returns a new list cont... View full answer
Get step-by-step solutions from verified subject matter experts
