summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xhn/g5
1 files changed, 5 insertions, 0 deletions
diff --git a/hn/g b/hn/g
index adbd4fc..d2c8f0d 100755
--- a/hn/g
+++ b/hn/g
@@ -73,3 +73,8 @@
(define (athings:file)
(build-path (athings:data-dir) (slug)))
+(define (athings:hash f)
+ (cond ((file-exists? f)
+ (call-with-input-file f (λ (in) (read-json in))))
+ (else (make-immutable-hash))))
+