step 1: Explain intention behind regexp magic in non-trivial hash-map test.
authorBen Harris <bjh21@bjh21.me.uk>
Sun, 7 Jul 2019 12:39:35 +0000 (13:39 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Sun, 7 Jul 2019 12:43:54 +0000 (13:43 +0100)
[skip travis]

tests/step1_read_print.mal

index 95e2e92..5d24cfa 100644 (file)
@@ -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   }  }}