diff options
-rw-r--r-- | def.asd | 3 | ||||
-rw-r--r-- | generic.lisp | 6 | ||||
-rw-r--r-- | util.lisp | 3 |
3 files changed, 7 insertions, 5 deletions
@@ -1,11 +1,10 @@ ;;;; def.asd (asdf:defsystem #:def - :description "Idomatic def* forms." + :description "Idiomatic def forms." :author "colin <colin@cicadas.surf>" :license "Unlicense" :version "0.0.1" - :depends-on (#:alexandria) :serial t :components ((:file "package") (:file "util") diff --git a/generic.lisp b/generic.lisp index d160527..cd8e2a8 100644 --- a/generic.lisp +++ b/generic.lisp @@ -1,8 +1,8 @@ ;;;; An implementation of a kind of generic function. This is not ;;;; terribly CLOSy, as it does not support inheritance. What we have -;;;; is a method selection routine that works on arbitrary types. -;;;; Some effort has been made to emulate CLOS's primary method -;;;; selection. +;;;; is a multiple-dispatch method selection routine that works on +;;;; arbitrary types. Some effort has been made to emulate CLOS's +;;;; primary method selection. (in-package :def) @@ -37,3 +37,6 @@ YES is everything for which PRED is T, NO is everything else." (defun lambda-opt-p (x) (find x '(cl:&optional cl:&key cl:&aux cl:&allow-other-keys cl:&rest) :test #'eq)) + +(defun make-keyword (name) + (intern (string name) :keyword)) |