diff options
| author | Joel Martin <github@martintribe.org> | 2014-04-06 15:23:40 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2014-04-06 15:23:40 -0500 |
| commit | 5ce65382cf4bdece30e9dee3f7765b698bd375e9 (patch) | |
| tree | 454089f5d1ea4ff1a2d78cf00e5c23397cac3065 /tests/stepA_more.mal | |
| parent | ea81a8087bcd7953b083a2be9db447f75e7ebf56 (diff) | |
| download | mal-5ce65382cf4bdece30e9dee3f7765b698bd375e9.tar.gz mal-5ce65382cf4bdece30e9dee3f7765b698bd375e9.zip | |
PS: add vector, hash-map, atoms and metadata.
As part of this lists switch from being a postscript array to being
a mal boxed type (dictionary with type in the /_maltype_ key).
Diffstat (limited to 'tests/stepA_more.mal')
| -rw-r--r-- | tests/stepA_more.mal | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/stepA_more.mal b/tests/stepA_more.mal index 31eb2bb..aac1bac 100644 --- a/tests/stepA_more.mal +++ b/tests/stepA_more.mal @@ -214,6 +214,9 @@ (dissoc hm3 "a" "b") ;=>{} +(dissoc hm3 "a" "b" "c") +;=>{} + (count (keys hm3)) ;=>2 @@ -236,6 +239,10 @@ (meta f-wm) ;=>{"abc" 1} +(def! f-wm2 ^"str meta" (fn* [a] (+ 1 a))) +(meta f-wm2) +;=>"str meta" + ;; ;; Testing atoms @@ -272,6 +279,8 @@ (swap! a (fn* (a) (* 2 a))) ;=>12 +(swap! a + 3) +;=>15 ;; ;; Testing read-str and eval |
