From 37e086d27d478246e72b8f5c1b75ed5d092495fa Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Sat, 2 Jul 2022 23:04:28 -0700 Subject: Write closure conversion. I desperately need a diffing library. --- csc/hash-map-test.csc | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'csc/hash-map-test.csc') diff --git a/csc/hash-map-test.csc b/csc/hash-map-test.csc index f346e1e..677406e 100644 --- a/csc/hash-map-test.csc +++ b/csc/hash-map-test.csc @@ -15,15 +15,8 @@ (stringstring s1) (symbol->string s2))) -(define (cmp-symbols s1 s2) - (cond - ((symbolmap->alist l) - (map->alist (alist->map hash-symbol cmp-symbols l))) + (map->alist (alist->map hash-symbol symbolmap hash-symbol cmp-symbols '((a . 1) (b . 2) (c . 3))) 'b))) + (lookup (alist->map hash-symbol symbolmap hash-symbol cmp-symbols '((a . 1) (b . 2) (c . 3))) 'd))) + (lookup (alist->map hash-symbol symbolalist (merge - (alist->map hash-symbol cmp-symbols '((a . 1) (b . 2))) - (alist->map hash-symbol cmp-symbols '((c . 3) (d . 4)))))))) + (alist->map hash-symbol symbolmap hash-symbol symbol