0

对于一项任务,我需要在 Haskell 中实现一个函数,定义的前两部分是:

> collatz :: Integer -> Integer -> Integer
> collatz x 0 = x

如果我在 ghci 中加载它没有错误,但如果我尝试调用它,则会发生此错误:

<interactive>:25:1: error:
    Variable not in scope: collatz :: Integer -> Integer -> t

我的问题是,这个错误是什么意思?我使用 Visual Studio Code 和集成的 Powershell。

4

0 回答 0