a) Create the greater/3 predicate that verifies if each number of a first list is greater than the
corresponding number in the second list. The results are given in a list of Booleans. Assume that
the two lists are of the same size.
?- greater ([3, 2, 6, 7,-2, 7, 0],
[5, 1, 0, 4, 2, 4, 6], D)
D= [#f, #t, #t, #t, #f, #t,
#f]
b) Modify this predicate such that it accepts lists of different sizes. If the first list is longer than the
second one then the resulting list is filled with #t; it will be filled with #f if the second list is the
longest.
?- greater ([3, 2, 6, 7,-2],
[5, 1, 0, 4, 2, 4, 6], D)
D= [#f, #t, #t, #t, #f, #f, #f]