0
我试图从Learn You a Haskell for Great Good编译此功能。GHCi错误:不在范围内
removeNonUppercase st = [ c | c <- st, c `elem` ['A'..'Z']]
将其放入removeNonUpperCase.hs文件中。
它编译罚款,但经过论证时:
ghci> removeNonUppercase "Hahaha! Ahahaha!"
编译器说:
<interactive>:1:0: Not in scope: 'removeNonUpperCase'
为什么?
PrintScreen: http://img535.imageshack.us/img535/9545/notinscope.png