我试图在 Haskell 的代码中使用 isNothing,但它给了我错误
\n<interactive>:97:23: error:\n\xe2\x80\xa2 Variable not in scope: isNothing :: Maybe t -> Bool\n\xe2\x80\xa2 Perhaps you meant data constructor \xe2\x80\x98Nothing\xe2\x80\x99 (imported from Prelude)\nRun Code Online (Sandbox Code Playgroud)\n我的代码行如下 -
\n maybeMap f value = if isNothing (value) then value else Just (f (check value))\nRun Code Online (Sandbox Code Playgroud)\nisNothing value如果我替换为,则效果很好value == Nothing,所以我很困惑为什么前一个不起作用。