Created
July 6, 2014 13:55
-
-
Save sebgod/9b25c5d8ec348770ed39 to your computer and use it in GitHub Desktop.
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
Here a solution without using negation, instead the universe of seasons is | |
specified. | |
<!-- language-all: prolog --> | |
season(summer). | |
season(winter). | |
now(winter). | |
warm(S) :- | |
season(S), | |
S = summer. | |
Some example queries: | |
?- now(S). | |
S = winter ; | |
false. | |
?- now(S), warm(S). | |
false. | |
?- warm(S). | |
S = summer ; | |
false. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment