我是 Haskell 新手,无法找出我的代码出了什么问题。我不断收到变量超出范围的错误。
这是我使用加载到 GHCi 中的代码:load
validLength :: String -> Bool
validLength xs | length xs == 26 = True
| otherwise = False
Run Code Online (Sandbox Code Playgroud)
然后我输入validLength aawhich 应该返回 false 但我收到错误。
*Main> validLength aa
<interactive>:1:13: error: Variable not in scope: aa :: String
Run Code Online (Sandbox Code Playgroud)