From 3e5ce69bce525725f2275ecf368e21d91a0b87f9 Mon Sep 17 00:00:00 2001 From: elioat Date: Sat, 3 Dec 2022 13:04:28 -0500 Subject: making the inspector more inspector-y...(failing) --- src/pokedex.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/pokedex.rkt b/src/pokedex.rkt index 7f03c23..89fd7ea 100644 --- a/src/pokedex.rkt +++ b/src/pokedex.rkt @@ -46,7 +46,8 @@ "display the contents of a hash table for human eyeballs" (hash-map h (lambda (k v) - (display (~a "key: " k ", value: " v "\n")))) ; QUESTION: is there a functional difference between hash-map and hash-for-each here? + (if (hash? v) (inspector v) ;; test if value is a hash table, if so recursively apply inspector (I don't think this is working right) + (display (~a "key: " k ", value: " v "\n"))))) ; QUESTION: is there a functional difference between hash-map and hash-for-each here? h) ; the sketch of how maybe to access these nested hash tables (this has become hillariously difficult to solve) -- cgit 1.4.1-2-gfad0