Advertisement
Guest User

Untitled

a guest
Jan 13th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. * (defclass foo () ())
  2.  
  3. #<STANDARD-CLASS COMMON-LISP-USER::FOO>
  4. * (defgeneric add (foo &rest bar))
  5.  
  6. #<STANDARD-GENERIC-FUNCTION COMMON-LISP-USER::ADD (0)>
  7. * (defmethod add ((foo foo) &rest bar)
  8. (list foo bar))
  9.  
  10. #<STANDARD-METHOD COMMON-LISP-USER::ADD (FOO) {1002CB6FD3}>
  11. * (add (make-instance 'foo) 2)
  12.  
  13. (#<FOO {1002CB90D3}> (2))
  14. *
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement