some experiments with prolog
Last active
November 30, 2025 22:56
-
-
Save upvalue/324a7906e96a5c478dacbb37f7eba2c5 to your computer and use it in GitHub Desktop.
prolog experiments
This file contains hidden or 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
| even(X) :- | |
| 0 is X mod 2. | |
| odd(X) :- | |
| 1 is X mod 2. | |
This file contains hidden or 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
| % claude helps: https://claude.ai/chat/d66fb55c-a9b5-40cb-8ba2-17572d3b1b1d | |
| % help know whether a color combination works or not | |
| % outfit(coat/blazer/jacket, shirt, bottom) | |
| % top(coat/blazer/jacket, shirt) | |
| top(navy, white). | |
| top(navy, white). | |
| top(khaki, black). | |
| top(khaki, charcoal). | |
| top(khaki, navy). | |
| top(navy, khaki). | |
| light(white). | |
| light(khaki). | |
| dark(navy). | |
| dark(black). | |
| dark(charcoal). | |
| outfit(Coat, Shirt, Bottom) :- | |
| top(Coat, Shirt), | |
| light(Shirt), | |
| dark(Bottom). | |
| outfit(Coat, Shirt, Bottom) :- | |
| top(Coat, Shirt), | |
| dark(Shirt), | |
| light(Bottom). | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment