Created
April 10, 2015 14:28
-
-
Save Logiraptor/e636e60a05e41980461c to your computer and use it in GitHub Desktop.
Find all predicates satisfied by a value.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sleepy(micah). | |
sleepy(john). | |
dumb(micah). | |
retiring(radle). | |
has_micah(X) :- | |
%% Find a predicate of arity 1 | |
current_predicate(X/1), | |
%% "Call" that predicate with micah | |
call(X, micah). | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment