我的測試函數有什麼問題?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