about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2022-12-04 12:42:19 -0500
committerelioat <elioat@tilde.institute>2022-12-04 12:42:19 -0500
commit742cf2632a0319a71fdd10bc0afd634da2e69aa6 (patch)
treef925f76410ed3bea4226f709fc98d18df1d1e3f8 /src
parent317764b17df4a3d7b9a3d6af9097a0c884920e0f (diff)
downloaddecember-2022-742cf2632a0319a71fdd10bc0afd634da2e69aa6.tar.gz
GETTING SO CLOSE
Diffstat (limited to 'src')
-rw-r--r--src/tmp.rkt21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/tmp.rkt b/src/tmp.rkt
index b46a1aa..08cd3fd 100644
--- a/src/tmp.rkt
+++ b/src/tmp.rkt
@@ -53,15 +53,16 @@
 
 ;; NEXT STEPS -> https://stackoverflow.com/questions/13504302/racket-scheme-filtering
 
-(hash-ref test-data "stats") ; all stats
-(hash-ref (car (hash-ref test-data "stats")) 'base_stat) ; value for a given stat
-(hash-ref (hash-ref (car (hash-ref test-data "stats")) 'stat) 'name) ; name for a given stat
-
-
-(map
- (lambda (x) (displayln "t")) ;; need a way to not use car, but just hit every item in the sequence
- (hash-ref test-data "stats"))
-
-
+; (hash-ref test-data "stats") ; all stats
+; (hash-ref (car (hash-ref test-data "stats")) 'base_stat) ; value for a given stat
+; (hash-ref (hash-ref (car (hash-ref test-data "stats")) 'stat) 'name) ; name for a given stat
 
+(define (inspector2 h)
+  (hash-map h
+            (lambda (k v)
+              (if (list? v) (map
+                             (lambda (x) (inspector2 x)) v)                
+                  (display (~a "  key: " k "\nvalue: " v "\n=====\n")))))
+  h)
 
+(inspector2 test-data)