Skip to content

Instantly share code, notes, and snippets.

@sudowork
Created February 5, 2013 13:59
Show Gist options
  • Save sudowork/4714612 to your computer and use it in GitHub Desktop.
Save sudowork/4714612 to your computer and use it in GitHub Desktop.
% testing the first clause
ancestor(zeb, john_boy_sr). % yes
ancestor(john_boy_sr, zeb). % no
% testing the second clause
ancestor(zeb, john_boy_jr). % yes
% let's ask, "Who is an ancestor of zeb"
ancestor(zeb, Who). % john_boy_sr ; john_boy_jr
% "Who is john_boy_jr an ancestor
ancestor(Who, john_boy_jr). % john_boy_sr ; zeb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment