在else中解析错误

时间:2010-10-29 15:59:20

标签: haskell syntax

 maxZyklus :: UntereGrenze -> ObereGrenze -> (UntereGrenze,ObereGrenze,MaxZyklaenge)
 maxZyklus m n = if m > n then (m,n,0) else if m == n then 
                         (m,n,length(func m)
                         else 
                         (m,n,length(func m)
 type UntereGrenze = Integer
 type ObereGrenze  = Integer
 type MaxZykLaenge = Integer

我在输入else上得到一个解析错误,第二个问题出在哪里?

1 个答案:

答案 0 :(得分:5)

你错过了两个)

(m,n,length(func m)

应该是

(m,n,length(func m))