diff options
| author | Joel Martin <github@martintribe.org> | 2014-11-03 20:32:46 -0600 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2015-01-09 16:16:44 -0600 |
| commit | 8128c69a1da03d3b8d62defb4533c3e3ae706682 (patch) | |
| tree | c005e9b22c1a851dbea727a127173011b94ec04a /tests/step8_macros.mal | |
| parent | c30efef469e22c8ba345a72c058c28362e57b746 (diff) | |
| download | mal-8128c69a1da03d3b8d62defb4533c3e3ae706682.tar.gz mal-8128c69a1da03d3b8d62defb4533c3e3ae706682.zip | |
R: add step8_macros and step9_try.
Diffstat (limited to 'tests/step8_macros.mal')
| -rw-r--r-- | tests/step8_macros.mal | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/tests/step8_macros.mal b/tests/step8_macros.mal index 6564eae..93f3ea9 100644 --- a/tests/step8_macros.mal +++ b/tests/step8_macros.mal @@ -114,14 +114,17 @@ ;; ;; -------- Optional Functionality -------- -;; Testing cons, concat, first, rest with vectors - -(cons [1] [2 3]) -;=>([1] 2 3) -(cons 1 [2 3]) -;=>(1 2 3) -(concat [1 2] (list 3 4) [5 6]) -;=>(1 2 3 4 5 6) +;; Testing nth, first, rest with vectors + +(nth [] 0) +;=>nil +(nth [1] 0) +;=>1 +(nth [1 2] 1) +;=>2 +(nth [1 2] 2) +;=>nil + (first []) ;=>nil (first [10]) |
