From 500017f2aa6ec1b4679a6878a7624eb7beaf1ee2 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 12 May 2020 16:38:34 -0700 Subject: Idempotently add id to tag index --- z.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'z.scm') diff --git a/z.scm b/z.scm index 46e6fcf..6cec0dd 100644 --- a/z.scm +++ b/z.scm @@ -161,7 +161,10 @@ (dict.update *tags* tag - (/. ids (cons id ids)))))))) + (/. ids + (if (contains? ids id) + ids + (cons id ids))))))))) (define (reindex) (set! *titles* (dict.empty)) -- cgit v1.2.3