【发布时间】:2018-11-18 12:53:56
【问题描述】:
我刚刚开始了解合同(通过 exercism.io),所以我签订了一份合同:
[step1 (-> (and/c number?
less-than-one-hundred?)
string?)]
我认为我的意思是该函数将采用小于 100 的数字(该函数定义为:
(define (less-than-one-hundred? n)
(< n 100))
但是当我这样调用函数时:
(step1 100)
没有违反合同。我做错了什么?
【问题讨论】: