From 17ae845ec1dc2c703f99d3cb9f5c01e1b5c52837 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Wed, 9 Apr 2014 21:57:50 -0500 Subject: C#: add metadata and atoms. --- tests/stepA_more.mal | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/stepA_more.mal b/tests/stepA_more.mal index abca165..456a092 100644 --- a/tests/stepA_more.mal +++ b/tests/stepA_more.mal @@ -249,6 +249,13 @@ (meta f-wm) ;=>{"abc" 1} +(meta (with-meta f-wm "new_meta")) +;=>"new_meta" + +(meta f-wm) +;=>{"abc" 1} + + (def! f-wm2 ^{"abc" 1} (fn* [a] (+ 1 a))) (meta f-wm2) ;=>{"abc" 1} @@ -289,8 +296,11 @@ (swap! a (fn* (a) (* 2 a))) ;=>12 +(swap! a (fn* (a b) (* a b)) 10) +;=>120 + (swap! a + 3) -;=>15 +;=>123 ;; ;; Testing read-str and eval -- cgit v1.2.3