Merge branch 'master' into bjh21-php-hashmap
authorBen Harris <bjh21@bjh21.me.uk>
Mon, 8 Jul 2019 20:26:30 +0000 (21:26 +0100)
committerGitHub <noreply@github.com>
Mon, 8 Jul 2019 20:26:30 +0000 (21:26 +0100)
1  2 
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)