Question: 3. Dates in Prolog can be expressed using the data structure: date(Day, Month, Year) A. Write a predicate recent which takes two dates and

 3. Dates in Prolog can be expressed using the data structure: date(Day,  

3. Dates in Prolog can be expressed using the data structure: date(Day, Month, Year) A. Write a predicate recent which takes two dates and return true if the first date argument is more recent than (i.e. after) the second date argument. B. Write a predicate allrecent" that takes a list of dates and a date X. The predicate returns a list of all dates that is after the date X. Make use of your predicate written in part A. C. Write a predicate that finds the most recent date in a list of dates. Make use of your predicate written in part A.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!