diff options
| author | Joel Martin <github@martintribe.org> | 2014-10-27 21:13:50 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2015-01-06 21:59:00 -0600 |
| commit | b12d98e4e3424be6b1e851c9450e9532910996ec (patch) | |
| tree | 317d8b69d1e0a67f42af06ebe257ffbac2393869 /tests | |
| parent | 3744d56621ff4c1c6c8a1fd6beb1d03123df53a5 (diff) | |
| download | mal-b12d98e4e3424be6b1e851c9450e9532910996ec.tar.gz mal-b12d98e4e3424be6b1e851c9450e9532910996ec.zip | |
rust: core hash-map functions.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/step9_try.mal | 47 |
1 files changed, 24 insertions, 23 deletions
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 @@ -208,6 +185,30 @@ ;; +;; 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]) ;=>nil |
