20 lines
583 B
Common Lisp
20 lines
583 B
Common Lisp
(load "functions.lisp")
|
|
|
|
(define-special dlambda (&rest methods)
|
|
(cons 'lambda
|
|
(cons '(&rest arguments)
|
|
(list
|
|
(cons 'case
|
|
(cons '(first arguments)
|
|
(mapcar
|
|
(lambda (method)
|
|
(cons (first method)
|
|
(list
|
|
(cons 'apply
|
|
(cons (cons 'lambda (rest method))
|
|
(list
|
|
(if (equal t (car method))
|
|
'arguments
|
|
'(rest arguments))))))))
|
|
methods)))))))
|