Question: Logic Programming 4) Write a Prolog program that removes a given number of arguments from the beginning of a list. You can assume that list
4) Write a Prolog program that removes a given number of arguments from the beginning of a list. You can assume that list has at least as many elements as the number of elements to remove and that this number is0. Hint: Construct a predicate with three arguments: an input list, a number, and an output list. Consider the case when the number is 0. Examples: ?- remove (a, b, c, d], 1, Sublist). Sublist [b, c, d] No ?-remove ([a, b, c, d], 3, Sublist) Sublist- [d] No
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
