aboutsummaryrefslogtreecommitdiff
path: root/tests/stepA_more.mal
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-04-23 21:46:57 -0500
committerJoel Martin <github@martintribe.org>2014-04-23 21:46:57 -0500
commit89bd4de1e2704c1bc562788b2c5e4fc08b71a538 (patch)
tree3ec33ca7e1030fdef0905317fdf911b8487685f0 /tests/stepA_more.mal
parent85cc53f35b8302e13f0014454ac320b971c196db (diff)
downloadmal-89bd4de1e2704c1bc562788b2c5e4fc08b71a538.tar.gz
mal-89bd4de1e2704c1bc562788b2c5e4fc08b71a538.zip
Perl: add vector, hash-map, metadata, atom support. TCO let*
- Changes all collections to be one level of inderection where the top level is always a hash containing 'meta' and 'val'.
Diffstat (limited to 'tests/stepA_more.mal')
-rw-r--r--tests/stepA_more.mal18
1 files changed, 15 insertions, 3 deletions
diff --git a/tests/stepA_more.mal b/tests/stepA_more.mal
index 4d2acf9..0378c58 100644
--- a/tests/stepA_more.mal
+++ b/tests/stepA_more.mal
@@ -66,6 +66,12 @@
(read-string "(1 2 (3 4) nil)")
;=>(1 2 (3 4) nil)
+(read-string "7 ;; comment")
+;=>7
+
+(read-string ";; comment")
+;=>nil
+
(eval (read-string "(+ 4 5)"))
;=>9
@@ -91,6 +97,15 @@
(sequential? "abc")
;=>false
+;; Testing vector functions
+
+(vector? [10 11])
+;=>true
+(vector? '(12 13))
+;=>false
+(vector 3 4 5)
+;=>[3 4 5]
+
;; Testing conj function
(conj (list) 1)
;=>(1)
@@ -198,9 +213,6 @@
(meta (fn* (a) a))
;=>nil
-(meta +)
-;=>nil
-
(with-meta [1 2 3] {"a" 1})
;=>[1 2 3]