From b12d98e4e3424be6b1e851c9450e9532910996ec Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Mon, 27 Oct 2014 21:13:50 -0500 Subject: rust: core hash-map functions. --- tests/step9_try.mal | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) (limited to 'tests') diff --git a/tests/step9_try.mal b/tests/step9_try.mal index 7b7dac5..b068355 100644 --- a/tests/step9_try.mal +++ b/tests/step9_try.mal @@ -108,29 +108,6 @@ (vector 3 4 5) ;=>[3 4 5] -;; Testing conj function -(conj (list) 1) -;=>(1) -(conj (list 1) 2) -;=>(2 1) -(conj (list 2 3) 4) -;=>(4 2 3) -(conj (list 2 3) 4 5 6) -;=>(6 5 4 2 3) -(conj (list 1) (list 2 3)) -;=>((2 3) 1) - -(conj [] 1) -;=>[1] -(conj [1] 2) -;=>[1 2] -(conj [2 3] 4) -;=>[2 3 4] -(conj [2 3] 4 5 6) -;=>[2 3 4 5 6] -(conj [1] [2 3]) -;=>[1 [2 3]] - (map? []) ;=>false @@ -207,6 +184,30 @@ ;=>2 +;; +;; Testing conj function +(conj (list) 1) +;=>(1) +(conj (list 1) 2) +;=>(2 1) +(conj (list 2 3) 4) +;=>(4 2 3) +(conj (list 2 3) 4 5 6) +;=>(6 5 4 2 3) +(conj (list 1) (list 2 3)) +;=>((2 3) 1) + +(conj [] 1) +;=>[1] +(conj [1] 2) +;=>[1 2] +(conj [2 3] 4) +;=>[2 3 4] +(conj [2 3] 4 5 6) +;=>[2 3 4 5 6] +(conj [1] [2 3]) +;=>[1 [2 3]] + ;; ;; Testing metadata (meta [1 2 3]) -- cgit v1.2.3