I know how to manipulate lists in prolog but I am having trouble with lists of lists, I am studying for an exam and this is one of the practise questions. Can someone help me out with it. All attempts I have made so far were utter failures.
Write a predicate called max2D which takes a list of lists of values as a parameter and returns the maximum of all the values in the list.
Example output: 57
?- max2D([[1,-7,3],[2,10],[19,3],[12]],M).
M = 19 .