Skip to content

Instantly share code, notes, and snippets.

@wulab
Created October 5, 2020 05:08
Show Gist options
  • Save wulab/5fd919cbcef50a0ed1c6b0e2d6d23d13 to your computer and use it in GitHub Desktop.
Save wulab/5fd919cbcef50a0ed1c6b0e2d6d23d13 to your computer and use it in GitHub Desktop.
activity(friday, 'september townhall').
activity(saturday, 'learn prolog facts').
activity(sunday, 'learn prolog rules').
weekend(saturday).
weekend(sunday).
weekend_activity(A) :-
activity(D, A),
weekend(D).
answer :-
weekend_activity(X),
tab(2), write(X), nl,
fail.
@wulab
Copy link
Author

wulab commented Oct 5, 2020

| ?- answer.
  learn prolog facts
  learn prolog rules

no

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment