From 891c3f3b478292ad0bfca44b0dc098a2aecc9a5d Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Sat, 8 Nov 2014 16:56:36 -0600 Subject: CoffeeScript: add all steps. Self-hosting. --- tests/step8_macros.mal | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/step8_macros.mal b/tests/step8_macros.mal index f2f62dc..8773ba8 100644 --- a/tests/step8_macros.mal +++ b/tests/step8_macros.mal @@ -1,4 +1,14 @@ -;; Testing first function +;; Testing nth, first and rest functions + +(nth '() 0) +;=>nil +(nth '(1) 0) +;=>1 +(nth '(1 2) 1) +;=>2 +(nth '(1 2) 2) +;=>nil + (first '()) ;=>nil (first '(6)) @@ -6,7 +16,6 @@ (first '(7 8 9)) ;=>7 -;; Testing rest function (rest '()) ;=>() (rest '(6)) -- cgit v1.2.3