about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
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)