Held: Wednesday, April 29, 1998
pred(X) :- generate(X),test(X).
alternative(X) :- musician(X),ancestor(velvet_underground,X).
pred(X) :- generate(Y),test(X,Y).
cool(X) :- coolInstrument(Y),plays(X,Y).
fail as the last predicate in a sequence.
loop(X) :- generate(X),write(X),fail.
members(L) :- member(X,L), write(X), nl, fail.
There are a number of topics in Prolog and logic programming that we haven't covered for issues of time. What are these topics? They include:
concat([], E, [a,b|E]) computes forever (or at least
until the implementation gives up).
foo(X,bar(X)), foo(A,A) computes
"forever" (or at least until the implementation gives up)
Menu object can
draw menus on the screen, but it's not important to you how it
does it.
insert doesn't throw exceptions.
Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.
Source text last modified Thu May 7 20:29:44 1998.
This page generated on Thu May 7 20:34:49 1998 by SiteWeaver.
Contact our webmaster at rebelsky@math.grin.edu