-1
;; 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)))]))
如上所述,它只是將X添加到列表的末尾。你會如何爲此寫一個簡單的檢查期望函數?檢查預期功能