-2
숫자 목록 끝에 새 번호를 추가하는 함수를 작성하려고하지만 구문 오류를 추적하고 수정할 수 없습니다. 누군가 나를 도울 수 있습니까? 감사!어떻게 프로그램이 실행되지 않고 구문 오류가 발생합니까? (DrRacket/Scheme)
(define (add the-list element)
(cond
((empty? the-list) (list element)
(else (cons (first the-list) cons (add (rest the-list) element))))))
(check-expect (four (list 2 5 4) 1) (list 2 5 4 1)) ; four adds num at the end of lon
전화'체크 기대 ''add'를 사용하고''four ''를 사용해서는 안됩니다. –