我的测试函数有什么问题?F#函数类型不匹配
let divisorOf(d, n) = n % d = 0
let notDivisible(d, n) = not (divisorOf(d, n))
let rec test(a, b, c) = function
| (a, b, _) when (a > b) -> true
| (a, b, c) -> notDivisible(a, c) && test(a + 1, b, c)
我得到一个编译器错误,第7行上的表达式具有函数类型,而不是bool。
(7,40): error FS0001: This expression was expected to have type
bool
but here has type
'a * 'a * 'b -> bool