about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2022-12-03 13:57:28 -0500
committerelioat <elioat@tilde.institute>2022-12-03 13:57:28 -0500
commit8214ad9ba7bc27cfd1a017f6f93ba972e5661603 (patch)
treefb8b0b9f3f91170bbd389e69024d0d45c0f7b12a /src
parent507d5b8606437b269f14c869beded7b87b9d0d9b (diff)
downloaddecember-2022-8214ad9ba7bc27cfd1a017f6f93ba972e5661603.tar.gz
*
Diffstat (limited to 'src')
-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))