Work transfer

This commit is contained in:
Felix Brendel
2020-02-18 10:52:05 +01:00
parent 7aa492df67
commit 7c220ed9d6
72 changed files with 19257 additions and 19094 deletions
+25 -25
View File
@@ -1,25 +1,25 @@
(define hm1 (hash-map))
(hm/set! hm1 1 "a")
(hm/set! hm1 "a" (lambda (x) (+ x 1)))
(assert (= ((hm/get hm1 (hm/get hm1 1)) 2) 3))
(define hm2 (hash-map))
(hm/set! hm2 'yes :yes)
(hm/set! hm2 :yes 'yes)
(assert (= (hm/get hm2 'yes) :yes))
(assert (= (hm/get hm2 :yes) 'yes))
(assert (= (hm/get hm2 (hm/get hm2 'yes)) 'yes))
(assert (= (hm/get hm2 (hm/get hm2 :yes)) :yes))
(assert (= (hm/get hm2 (hm/get hm2 (hm/get hm2 'yes))) :yes))
(assert (= (hm/get hm2 (hm/get hm2 (hm/get hm2 :yes))) 'yes))
(define hm3 (hash-map))
(hm/set! hm3 + 'plus)
(hm/set! hm3 - 'minus)
(assert (= (hm/get hm3 +) 'plus))
(assert (= (hm/get hm3 -) 'minus))
(define hm1 (hash-map))
(hm/set! hm1 1 "a")
(hm/set! hm1 "a" (lambda (x) (+ x 1)))
(assert (= ((hm/get hm1 (hm/get hm1 1)) 2) 3))
(define hm2 (hash-map))
(hm/set! hm2 'yes :yes)
(hm/set! hm2 :yes 'yes)
(assert (= (hm/get hm2 'yes) :yes))
(assert (= (hm/get hm2 :yes) 'yes))
(assert (= (hm/get hm2 (hm/get hm2 'yes)) 'yes))
(assert (= (hm/get hm2 (hm/get hm2 :yes)) :yes))
(assert (= (hm/get hm2 (hm/get hm2 (hm/get hm2 'yes))) :yes))
(assert (= (hm/get hm2 (hm/get hm2 (hm/get hm2 :yes))) 'yes))
(define hm3 (hash-map))
(hm/set! hm3 + 'plus)
(hm/set! hm3 - 'minus)
(assert (= (hm/get hm3 +) 'plus))
(assert (= (hm/get hm3 -) 'minus))