fixed the tests with new args

This commit is contained in:
Felix Brendel
2019-09-21 01:24:15 +02:00
parent 5f90f2877f
commit 47b33f2f3a
14 changed files with 1108 additions and 1439 deletions
+5 -6
View File
@@ -1,8 +1,8 @@
(define-syntax (define-class name-and-members :rest body)
(define-syntax (define-class name-and-members . body)
"Macro for creating simple classes."
(let ((name (first name-and-members))
(members (rest name-and-members)))
`(set-type
`(set-type!
(define
;; The function definition
(,(string->symbol (concat-strings "make-" (symbol->string name))) @members)
@@ -11,8 +11,8 @@
;; the body
@body
(let ,(zip members members)
(set-type
(lambda (:rest args)
(set-type!
(lambda args
"This is the docs for the handle"
(let ((op (eval (first args))))
(if (callable? op)
@@ -21,6 +21,5 @@
,(symbol->keyword name))))
:constructor)))
(define-syntax (-> obj meth :rest args)
(define-syntax (-> obj meth . args)
`(,obj ',meth @args))