wescheme

Scheme code cond error in Wescheme

。_饼干妹妹 提交于 2020-01-02 08:13:05
问题 Although the following code works perfectly well in DrRacket environment, it generates the following error in WeScheme: Inside a cond branch, I expect to see a question and an answer, but I see more than two things here. at: line 15, column 4, in <definitions> How do I fix this? The actual code is available at http://www.wescheme.org/view?publicId=gutsy-buddy-woken-smoke-wrest (define (insert l n e) (if (= 0 n) (cons e l) (cons (car l) (insert (cdr l) (- n 1) e)))) (define (seq start end) (if

Scheme code cond error in Wescheme

青春壹個敷衍的年華 提交于 2019-12-06 00:01:07
Although the following code works perfectly well in DrRacket environment, it generates the following error in WeScheme: Inside a cond branch, I expect to see a question and an answer, but I see more than two things here. at: line 15, column 4, in <definitions> How do I fix this? The actual code is available at http://www.wescheme.org/view?publicId=gutsy-buddy-woken-smoke-wrest (define (insert l n e) (if (= 0 n) (cons e l) (cons (car l) (insert (cdr l) (- n 1) e)))) (define (seq start end) (if (= start end) (list end) (cons start (seq (+ start 1) end)))) (define (permute l) (cond [(null? l) '((