HCoop
/
jackhill
/
mal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
combined
(merge:
b65e5d7
e69f0ea
)
Merge pull request #413 from bjh21/bjh21-nontrivial-hashmap
author
Joel Martin
<github@martintribe.org>
Mon, 8 Jul 2019 15:08:50 +0000
(10:08 -0500)
committer
GitHub
<noreply@github.com>
Mon, 8 Jul 2019 15:08:50 +0000
(10:08 -0500)
step 1: Test a hash-map with more than one entry.
1
2
tests/step1_read_print.mal
patch
|
diff1
|
diff2
|
blob
|
history
diff --cc
tests/step1_read_print.mal
index
eec31c9
,
5d24cfa
..
ef4342e
---
1
/
tests/step1_read_print.mal
---
2
/
tests/step1_read_print.mal
+++ b/
tests/step1_read_print.mal
@@@
-157,10
-153,12
+157,14
@@@
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}}}
+({})
+;=>({})
;; Testing read of comments
;; whole line comment (not an exception)