From 0d7cb228076354f893527bce2d426e21697832a9 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Sat, 15 Jan 2022 22:40:01 -0800 Subject: Finish the macro expander. It works!! At least it passes all the test cases. Next I will: 1. finish the builtins, 2. add a conversion to IR2 in continuation passing style, 3. add a compiler from IR2 to bytecode, 4. and add an option to the frontend compiler to generate a standalone executable. --- csc/hash-map.csc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'csc/hash-map.csc') diff --git a/csc/hash-map.csc b/csc/hash-map.csc index 81ed770..ae5c3df 100644 --- a/csc/hash-map.csc +++ b/csc/hash-map.csc @@ -1,7 +1,7 @@ (define-library (csc hash-map) (export alist->map - for-each + map-for-each hash-bytevector insert key-not-found-error? @@ -225,7 +225,7 @@ (lookup (map-root m)))) - (define (for-each f m) + (define (map-for-each f m) (letrec ((node-foreach (lambda (n) (unless (null? n) @@ -237,7 +237,7 @@ (define (map->alist m) (let ((alist '())) - (for-each + (map-for-each (lambda (k v) (set! alist (cons (cons k v) alist))) m) @@ -262,7 +262,7 @@ (define (merge2 m1 m2) (let ((m1 m1)) - (for-each + (map-for-each (lambda (k v) (set! m1 (insert m1 k v))) m2) -- cgit v1.3.1