Adding car and cdr functions

This commit is contained in:
teo3300
2024-05-24 18:43:43 +09:00
parent 06adb25362
commit 97f1bd8d82
4 changed files with 31 additions and 1 deletions

7
tests/car-cdr.mal Normal file
View File

@ -0,0 +1,7 @@
;; Test car
(assert-eq (car '(1 2 3)) 1)
(assert-eq (car '()) nil)
;; Test cdr
(assert-eq (cdr '(1 2 3)) '(2 3))
(assert-eq (cdr '()) '())