我的 OCaml 程序中有一个错误,我正在寻求帮助。
错误:
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;;`
谁能帮我?