3
我在OCaml的程序中有一个错误,我在寻求帮助。此表达式具有类型单位,但表达式类型为int
错误:
This expression has type unit but an expression was expected of type int
与错误路线错误包含soma = soma
let soma = 0;;
let rec nBell n =
if n == 0 then 1
else
for k=0 to n-1 do
soma = soma + ((fact(n-1)/(fact(k)*fact((n-1)-k))) * nBell(k));
done;;`
谁能帮助我?