我尝试使用受保护的方程来定义一个函数。为什么它在 GHCi 中不起作用?谢谢。
Prelude> :{
Prelude| maxThree :: Integer -> Integer -> Integer -> Integer
Prelude| maxThree x y z
Prelude| x >= y && x >= z = x
Prelude| y >= z = y
Prelude| otherwise = z
Prelude| :}
<interactive>:77:1: error: Parse error in pattern: x >= y