Skip to content

Instantly share code, notes, and snippets.

@micahrj
Created June 16, 2010 16:32
Show Gist options
  • Save micahrj/440930 to your computer and use it in GitHub Desktop.
Save micahrj/440930 to your computer and use it in GitHub Desktop.
(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