diff options
author | elioat <elioat@tilde.institute> | 2022-12-04 12:42:19 -0500 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2022-12-04 12:42:19 -0500 |
commit | 742cf2632a0319a71fdd10bc0afd634da2e69aa6 (patch) | |
tree | f925f76410ed3bea4226f709fc98d18df1d1e3f8 | |
parent | 317764b17df4a3d7b9a3d6af9097a0c884920e0f (diff) | |
download | december-2022-742cf2632a0319a71fdd10bc0afd634da2e69aa6.tar.gz |
GETTING SO CLOSE
-rw-r--r-- | src/tmp.rkt | 21 |
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) |