Form types
[clinton/lisp-on-lines.git] / src / lines.lisp
CommitLineData
a4e6154d
DC
1(in-package :lisp-on-lines)
2
f9b11956 3(define-layered-function line-in (name)
4 (:method-combination append)
5 (:method append (thing)
6 '()))
7
a4e6154d
DC
8(defmacro defline (name (specializer &rest layers-and-combination-keywords) &body docstring-and-body)
9 `(progn
a4e6154d
DC
10 (define-layered-method
11 ,name
12 ,@layers-and-combination-keywords
13 ,@(unless
14 (or (third layers-and-combination-keywords)
15 (and layers-and-combination-keywords
16 (null (cdr layers-and-combination-keywords))))
17 '(APPEND))
18 (,specializer)
19 ,(when (cdr docstring-and-body)
20 (car docstring-and-body))
21
22 ,(or (cdr docstring-and-body) (car docstring-and-body)))))
23
a4e6154d 24