我将如何继续证明这两个函数的类型正确?我对这个问题有点迷茫。
let rec reduce f lst u =
match lst with
| [] -> u
| (h::t) -> f h (reduce f t u)
let rec forall2 p l1 l2 =
match (l1,l2) with
| ([],[]) -> true
| ([],_) -> false
| (_,[]) -> false
| ((h1::t1),(h2::t2)) ->
(p h1 h2) && (forall2 p t1 t2)