|
|
@ -168,6 +168,12 @@ |
|
|
|
;; whether the results make sense. |
|
|
|
(require typed/rackunit) |
|
|
|
|
|
|
|
;; TODO: Submit an update to hash->list in Racket and then remove |
|
|
|
;; this function. |
|
|
|
(: hash->ordered-list (All (a b) (-> (HashTable a b) (Listof (Pairof a b))))) |
|
|
|
(define (hash->ordered-list h) |
|
|
|
(hash-map h (inst cons a b) #t)) |
|
|
|
|
|
|
|
(test-case "1 Generic Graph Interface" |
|
|
|
(define g (directed-graph '((a b) (b c)))) |
|
|
|
(check-false (has-edge? g 'a 'c)) |
|
|
|