From 96fba8d1e6436b258998921546537e74e338e00e Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Tue, 18 Jun 2019 19:49:32 -0400 Subject: hn/g: Add athings:hash * hn/g (athings:hash): New function. --- hn/g | 5 +++++ 1 file changed, 5 insertions(+) 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)))) + -- cgit v1.2.3