Created
June 16, 2010 16:32
-
-
Save micahrj/440930 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
(defclass rock ()()) | |
(defclass paper ()()) | |
(defclass scissors ()()) | |
(defgeneric r-p-s (a b)) | |
(defmethod r-p-s ((r rock) (p paper)) 'paper) | |
(defmethod r-p-s ((r rock) (s scissors)) 'rock) | |
(defmethod r-p-s ((p paper) (s scissors)) 'scissors) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment