;; snoc : X [Listof Any] -> [Listof Any]
;; Adds the X to the end of the list
(define (snoc x l)
(cond [(empty? l) (cons x empty)]
[else (cons (first l)
(snoc x (rest l)))]))
As described above, it simply adds an X to the end of the list. How would you write a simple check-expect function for this?