0
を期待:は、私はSICPを学んでいるが、私は奇妙な質問会い、最近のparams
Error: remainder: contract violation expected: integer? given: '(3 4 5 6) argument position: 1st other arguments...: 2
ここに私のコードだが
(define (same-parity sample . other)
(if (null? other)
(cons sample '())
(if (= (remainder sample 2) (remainder (car other) 2))
(cons (car other) (same-parity sample (cdr other)))
(same-parity sample (cdr other)))))
(same-parity 1 2 3 4 5 6)
- OS:win10
- ラング:ラケットv6.10.1
これは、整数のパラメータを期待して残りの部分を返します 私は残りの部分に整数を与えたと思います。誰かが私のコードに何が間違っているのかを伝えることができます。私は大きな困惑の中にいる。少し早いですがお礼を。
これは私の問題を完全に解決しました – Ceuvres