From e69f0ea3d4286dcd5d46f36b71b9fdc08bf6993b Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sun, 7 Jul 2019 13:39:35 +0100 Subject: [PATCH] step 1: Explain intention behind regexp magic in non-trivial hash-map test. [skip travis] --- tests/step1_read_print.mal | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/step1_read_print.mal b/tests/step1_read_print.mal index 95e2e921..5d24cfaf 100644 --- a/tests/step1_read_print.mal +++ b/tests/step1_read_print.mal @@ -153,6 +153,8 @@ false ;=>{"a" {"b" {"c" 3}}} { "a" {"b" { "cde" 3 } }} ;=>{"a" {"b" {"cde" 3}}} +;;; The regexp sorcery here ensures that each key goes with the correct +;;; value and that each key appears only once. {"a1" 1 "a2" 2 "a3" 3} ;/{"a([1-3])" \1 "a(?!\1)([1-3])" \2 "a(?!\1)(?!\2)([1-3])" \3} { :a {:b { :cde 3 } }}