pre merge

This commit is contained in:
FelixBrendel
2019-04-21 21:56:59 +02:00
parent 903d9bdd8c
commit 987dbcdd62
4 changed files with 29 additions and 26 deletions
+5 -5
View File
@@ -1,8 +1,8 @@
(define-syntax when (condition :rest body)
(define-syntax (when condition :rest body)
"Doc String for 'when'"
`(if ,condition ,(pair prog body) nil))
(define-syntax unless (condition :rest body)
(define-syntax (unless condition :rest body)
`(if ,condition nil ,(pair prog body)))
;; (define-syntax defun (name arguments :rest body)
@@ -116,11 +116,11 @@ the (rest) of the last element of the sequence."
with (pair elem nil)."
(extend seq (pair elem nil)))
(define-syntax extend! (seq elem)
(define-syntax (extend! seq elem)
"test"
`(mutate ,seq (extend ,seq ,elem)))
(define-syntax append! (seq elem)
(define-syntax (append! seq elem)
`(mutate ,seq (append ,seq ,elem)))
(define (length seq)
@@ -237,5 +237,5 @@ las argument."
(eval (pair printf-quoted (extend (list :@sep (eval sep) :@end (eval end)) args))))
(define-syntax pe (expr)
(define-syntax (pe expr)
`(printf ',expr "evaluates to" ,(eval expr)))
+1 -1
View File
@@ -2,7 +2,7 @@
(set-type obj type)
obj)
(define-syntax defclass (name members :rest body)
(define-syntax (defclass name members :rest body)
"Macro for creating classes."
(define (underscore sym)
(string->symbol (concat-strings "_" (symbol->string sym))))