Skip to content

Instantly share code, notes, and snippets.

We couldn’t find that file to show.
;;;; MIXIN
(defgeneric object-width (object)
"Generic function with one argument using the + method
combination. The + method combination determines that all
applicable methods for a generic function will be called and the
results will be added.")
(:method-combination +))

Keybase proof

I hereby claim:

  • I am khirbat on github.
  • I am khirbat ( on keybase.
  • I have a public key whose fingerprint is E871 BB48 812F A3F1 DE14 D5A3 A1BD 56CF 27B8 E05F

To claim this, I am signing this object:

khirbat / hw7.lisp
Last active April 2, 2016 19:12
Coursera Programming Languages homework 7 in Common Lisp using multimethods/multiple dispatch.
;;;; hw7.lisp
;;; USAGE:
;;; Use the functions listed under the heading CONSTRUCTORS to create
;;; the public interface. All other functions should be considered
;;; private. Symbols (not strings) are used to represent variables.
;;; CL-USER> (load "hw7.lisp")
khirbat / dep.lisp
Created August 16, 2012 16:46
Quicklisp reverse dependencies
(defun rdep (system)
"Return list of Quicklisp packages that use SYSTEM"
(let (rdeps)
(dolist (s (ql-dist:provided-systems (ql-dist:find-dist "quicklisp")) rdeps)
(if (member system (ql-dist:required-systems s) :test #'equal)
(push (ql-dist:name s) rdeps)))))
khirbat / gist:3134402
Created July 18, 2012 05:33
Make your own SLIME presentation commands
(defmethod swank::menu-choices-for-presentation ((ob fixnum))
`(("English" ,(lambda (choice object id) (format t "~r~%" object)))))