diff options
| author | Rose Hogenson <rhogenson@posteo.net> | 2022-01-15 22:40:01 -0800 |
|---|---|---|
| committer | Rose Hogenson <rhogenson@posteo.net> | 2022-01-15 22:40:01 -0800 |
| commit | 0d7cb228076354f893527bce2d426e21697832a9 (patch) | |
| tree | fa12d1afff4cdb077437b11544c9ef8f299cd88e /csc/hash-map.csc | |
| parent | a968e8595b999d5c0a43c59de69bcb4f34e205c1 (diff) | |
| download | chromatopelma-0d7cb228076354f893527bce2d426e21697832a9.tar.zst | |
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.
Diffstat (limited to 'csc/hash-map.csc')
| -rw-r--r-- | csc/hash-map.csc | 8 |
1 files changed, 4 insertions, 4 deletions
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) |
