1
1
mirror of https://github.com/kanaka/mal.git synced 2024-08-16 17:20:23 +03:00

step 1: Explain intention behind regexp magic in non-trivial hash-map test.

[skip travis]
This commit is contained in:
Ben Harris 2019-07-07 13:39:35 +01:00
parent d6383c83d2
commit e69f0ea3d4

View 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 } }}