Created
January 20, 2023 19:00
-
-
Save yvern/0f8268d3c9be0395ff115b21c4bee603 to your computer and use it in GitHub Desktop.
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
(defrule overflow? | |
[?middle <- :middle] | |
[:or [?max <- :top] [?max <- :right]] | |
[:test (<= ($ ?max) ($ ?middle))] | |
=> | |
(insert! {:fact-type :overflow!})) | |
(defrule underflow? | |
[?middle <- :middle] | |
[:or [?min <- :bottom] [?min <- :left]] | |
[:test (<= ($ ?middle) ($ ?min))] | |
=> | |
(insert! {:fact-type :underflow!})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment