The whole question is define the following predicates in prolog:
1, lastelem(L,X) which is true only when X is the last element in the list L.
2, replast(L,X,M) which is true only when M is the same as L except(possibly) for the last element which is X for M.
3, exchfal(L,M) which is true only...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.