X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=blobdiff_plain;f=src%2Fscheme-library.scm;h=ec5c08e16dc7e7253686442a534328fe78c68e6f;hb=ba5f17e7b376655b6e84794b33a2adc08dc8bf3f;hp=67ab483b2ea5c90b81355135767f4b374bd8f6a0;hpb=724ff46a1b082bef48b310a85d5a82037c2a914c;p=scheme.forth.jl.git diff --git a/src/scheme-library.scm b/src/scheme-library.scm index 67ab483..ec5c08e 100644 --- a/src/scheme-library.scm +++ b/src/scheme-library.scm @@ -1,3 +1,7 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Standard Library Procedures and Macros ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;; DERIVED FORMS ;; define (procedural syntax) @@ -122,6 +126,10 @@ (expand-or-expressions expressions)) )) +;; not + +(define-macro (not x) + `(if ,x #f #t)) ;; FUNCTIONAL PROGRAMMING @@ -314,6 +322,9 @@ ;; LISTS +; List creation +(define (list . args) args) + ; Return number of items in list (define (length l) (define (iter a count)