Updated readme.
authorTim Vaughan <tgvaughan@gmail.com>
Mon, 19 Jun 2017 10:27:16 +0000 (22:27 +1200)
committerTim Vaughan <tgvaughan@gmail.com>
Mon, 19 Jun 2017 10:27:16 +0000 (22:27 +1200)
README.md
src/scheme-library.scm
src/scheme-primitives.4th

index 52b4b6f..0a861b9 100644 (file)
--- a/README.md
+++ b/README.md
@@ -75,8 +75,15 @@ You'll then be greeted by the following prompt:
     ;; M-Eval input:
 
 At this point you can start entering Scheme commands... but be prepared to wait
     ;; M-Eval input:
 
 At this point you can start entering Scheme commands... but be prepared to wait
-a _long_ time for the result.  For instance, the following example from SICP
-defines and demonstrates a recursive list append procedure:
+a while for the result.  After all, when evaluating commands in the MCE you are
+running a program in a Scheme interpreter running inside another Scheme
+interpreter which is itself running on a Forth system that is implemented atop
+the Julia numerical computing environment.  **That's three levels of
+abstraction more than a native Julia program experiences**, so some delay is to
+be expected!
+
+For instance, the following example from SICP defines and demonstrates a
+recursive list append procedure:
 
     (define (append x y)
        (if (null? x)
 
     (define (append x y)
        (if (null? x)
@@ -93,10 +100,7 @@ defines and demonstrates a recursive list append procedure:
      ;;; M-Eval value:
      (a b c d e f)
 
      ;;; M-Eval value:
      (a b c d e f)
 
-Be prepared to wait 20 min or more for the final result to be printed.  (Given
-that at this point we have a program running in a Scheme interpreter running
-inside another Scheme interpreter which is itself running on a Forth system
-that is implemented in Julia, this should not be a surprise.)
+You may have to wait a minute or so for the final result to be printed.
 
 License
 =======
 
 License
 =======
index 67ab483..78414ac 100644 (file)
                  (expand-or-expressions expressions))
    ))
 
                  (expand-or-expressions expressions))
    ))
 
+;; not
+
+(define-macro (not x)
+              `(if ,x #f #t))
 
 ;; FUNCTIONAL PROGRAMMING
 
 
 ;; FUNCTIONAL PROGRAMMING
 
 
 ;; LISTS
 
 
 ;; LISTS
 
+; List creation
+(define (list . args) args)
+
 ; Return number of items in list
 (define (length l)
   (define (iter a count)
 ; Return number of items in list
 (define (length l)
   (define (iter a count)
index 493f256..1e37e0d 100644 (file)
@@ -611,7 +611,14 @@ defer display
     nil? if
         ." Error."
     else
     nil? if
         ." Error."
     else
-        ." Error: " car display
+        ." Error: "
+
+        begin
+            2dup car print
+            cdr nil?
+        until
+
+        2drop
     then
 
     reset-term
     then
 
     reset-term