Part A. 1. (2 pts) Write a Prolog program that returns the final element of a given list. You are expected to write your
Posted: Sat May 14, 2022 6:56 pm
Part A. 1. (2 pts) Write a Prolog program that returns the final element of a given list. You are expected to write your own predicates and not simply redefine or call a predefined one (including ones available in the libraries that come with SWi-Prolog). 2. (2 pts) Write a Prolog program that finds the maximum in a given list of numbers You are expected to write your own predicates and not simply redefine or call a predefined one (including nes available in the libraries that come with SWi-Prolog).