Prolog III. Lists. [ ] is the empty list. [x, 2+2, [a, b, c]] is a list of three elements The first element in the list is its “ head ” The list with the head removed is the “ tail ”. Lists. Unification can be performed on lists: [a, b, c] = [X, Y, Z] results in
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
write('There is a '), write(X), write(' here.'), nl,
loves(chuck, X) :-really_ugly(X), !, fail.
loves(chuck, X) :- female(X), rich(X).