From: Ben Harris Date: Mon, 8 Jul 2019 20:26:30 +0000 (+0100) Subject: Merge branch 'master' into bjh21-php-hashmap X-Git-Url: https://git.hcoop.net/jackhill/mal.git/commitdiff_plain/7260b2987942176b1b208df09b163db02b2b8f4e Merge branch 'master' into bjh21-php-hashmap --- 7260b2987942176b1b208df09b163db02b2b8f4e diff --cc tests/step1_read_print.mal index 2abb4e9c,ef4342e7..1a3bcf7a --- a/tests/step1_read_print.mal +++ b/tests/step1_read_print.mal @@@ -153,10 -157,14 +157,16 @@@ fals ;=>{"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 } }} ;=>{:a {:b {:cde 3}}} +{"1" 1} +;=>{"1" 1} + ({}) + ;=>({}) ;; Testing read of comments ;; whole line comment (not an exception)