mirror of
https://github.com/teo3300/rust-mal.git
synced 2026-01-12 01:05:32 +01:00
Adding car and cdr functions
This commit is contained in:
7
tests/car-cdr.mal
Normal file
7
tests/car-cdr.mal
Normal 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 '()) '())
|
||||
Reference in New Issue
Block a user