Implemented let*
authorTim Vaughan <tgvaughan@gmail.com>
Wed, 31 May 2017 09:39:52 +0000 (21:39 +1200)
committerTim Vaughan <tgvaughan@gmail.com>
Wed, 31 May 2017 09:39:52 +0000 (21:39 +1200)
src/scheme-library.scm
src/scheme.4th

index 2c6146e..a420c70 100644 (file)
               `((lambda ,(map (lambda (x) (car x)) args)
                  ,@body) ,@(map (lambda (x) (cadr x)) args)))
 
+; let*
+
+(define-macro (let* args . body)
+              (if (null? args)
+                `(let () ,@body)
+                `(let (,(car args))
+                   (let* ,(cdr args) ,@body))))
+
 ; while
 
 (define-macro (while condition . body)
index 6e2c492..d0bca19 100644 (file)
@@ -1652,7 +1652,7 @@ hide env
                 R> drop ['] eval goto-deferred  \ Tail call optimization
             endof
 
-            except-message: ." object not applicable." recoverable-exception throw
+            except-message: ." object '" drop print ." ' not applicable." recoverable-exception throw
         endcase
 ;