handle error of return-from, block

fix fnblock
This commit is contained in:
yoyo
2024-09-12 22:14:49 +09:00
parent a196cec636
commit 001eafc790
5 changed files with 27 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
(defmacro defun (name args body)
`(define ,name (block ,name (lambda ,args ,body))))
`(define ,name (lambda ,args (block ,name ,body))))
(defmacro cond (expr . rest)
(if (not expr)
@@ -28,5 +28,9 @@
`(if (not ,test)
(progn ,@rest)))
(defmacro return (res)
(return-from nil `,res))
(defun list (x . y) (cons x y))