Created
May 19, 2020 17:13
-
-
Save brosenan/f234e4fd36e329b256a817deb3e0d60b 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
(defpred forte [type] | |
(forte-val [type] int)) | |
(defrule (forte ()) | |
(forte-val [_] 0)) | |
(defrule (forte ('O & rest)) | |
[(forte rest)] | |
(forte-val [(_ & rest)] | |
(* (forte-val rest) 2))) | |
(defrule (forte ('I & rest)) | |
[(forte rest)] | |
(forte-val [(_ & rest)] | |
(+ (* (forte-val rest) 2) 1))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment