about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/pokedex.rkt6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pokedex.rkt b/src/pokedex.rkt
index cc48fba..67710f6 100644
--- a/src/pokedex.rkt
+++ b/src/pokedex.rkt
@@ -46,11 +46,13 @@
     "display the contents of a hash table for human eyeballs and let the hash table fall back out"
     (hash-map h
         (lambda (k v)
+          (if (hash? v) (~a "value " v " was a hash table!\n") ;; test to see if a value is a hash table
             (display (~a "key: " k ", value: " v "\n")))) ; QUESTION: is there a functional difference between hash-map and hash-for-each here?
-    h)
+    h))
 
-(hash-ref (dex-entry 5) "types") ;; struggling to figure out how to access the nested hash tables stats and types...
+; (hash-ref (dex-entry 5) "types") ;; struggling to figure out how to access the nested hash tables stats and types...
 
 ;; the other option not yet considered is to make individual API calls for each bit of data, rather than 1 call and plucking out the data I want.
 ;; this may lead to an easier data shape, but means a lot more network traffic.
 
+(inspector (dex-entry 11))