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