通过旧的考试,我复制了这段代码,并试图让它正常工作。
rems :: Integer -> [(Integer ,Integer )] rems n = [(i, n `mod` i) | i <- [2 ..(nâ1)]]
现在,无论是否使用类型声明,我都会得到一个错误:
Variable not in scope: (â) :: Integer -> Integer -> Integer ghc version 8.6.3
rems n = [(i, n `mod` i) | i <- [2 ..j] ] where j = n-1
有人能向我解释一下,为什么这种看似没有效果的改变能够纠正错误,还有其他的方法吗?
这是一个简单的印刷错误。你的 â
â