Page 1 of 1

1.A Prolog program that takes two integer lists as arguments and returns either “T” or “F” is given below. a.Explain wha

Posted: Sat May 14, 2022 7:13 pm
by answerhappygod
1.A Prolog program that takes two integer lists as arguments and
returns either “T” or “F” is given below.
a.Explain what this code does.
b.Take [1, 8, 20], [1, 7] as argumnets what will be the
result?
c.Take [1, 8, 20], [1, 8, 23] as arguments what will be the
result?
lexless([],[_|_]).
lexless([X|_],[Y|_]) :-X < Y.
lexless([A|B],[C|D]) :-A = C, lexless(B,D).