任何人可以帮助我理解这段代码Haskell的执行顺序
solve s | s == 0 = Nothing
| s == 1 = Just 1
| otherwise =
check [solve (s-(x*2)) | x <- [1..9]]
check x = case x of
[] -> Nothing
(Nothing:xs) -> check xs
(x:xs) -> x
为什么这给出了流程,当我试图用偶数值运行栈,并且有在Haskell任何方式,我可以调试,看到了正在运行的程序的实际价值,就像在eclipse中我们做的一样?
谢谢
这不是真的!查看GHCi最新版本的手册:http://www.haskell.org/ghc/docs/latest/html/users_guide/ghci-debugger.html – porges 2009-11-28 11:11:48
谢谢。我会检查一下。 – Dan 2009-11-28 17:04:42