2017-03-06 11:00:18 -05:00
|
|
|
(load "functions.lisp")
|
2017-03-01 16:33:06 -05:00
|
|
|
|
|
|
|
(define-macro dlambda (&rest methods)
|
|
|
|
(cons
|
|
|
|
(quote lambda)
|
|
|
|
(cons
|
|
|
|
(quote (&rest arguments))
|
|
|
|
(list
|
|
|
|
(cons
|
|
|
|
(quote case)
|
|
|
|
(cons
|
|
|
|
(quote (first arguments))
|
2017-03-02 14:26:47 -05:00
|
|
|
(mapcar
|
2017-03-01 16:33:06 -05:00
|
|
|
(lambda (method)
|
|
|
|
(cons
|
|
|
|
(first method)
|
|
|
|
(list
|
|
|
|
(cons
|
|
|
|
(quote apply)
|
|
|
|
(cons
|
|
|
|
(cons
|
|
|
|
(quote lambda)
|
2017-03-06 11:00:18 -05:00
|
|
|
(rest method))
|
2017-03-02 14:26:47 -05:00
|
|
|
(list
|
|
|
|
(if (equal t (car method))
|
|
|
|
(quote arguments)
|
2017-03-06 11:00:18 -05:00
|
|
|
(quote (rest arguments)))))))))
|
|
|
|
methods)))))))
|