“I suggest the Haskell Wikibook as the best overall intro to Haskell actually: Haskell Wikibook”
Haskell Wikibook
社区共写的 Haskell 入门到进阶,讲清 Functor 与 Monad
Wikibooks 社区共同编写的 Haskell 教程,从基础语法一路讲到 Functor、Applicative、Monad、惰性求值和 zipper 等进阶主题。内容以讲解和例子为主,行文精炼,没有太多铺垫。和 Learn You a Haskell 等同类教材相比,它更像一份可以按章节查阅的参考型教程,由多位作者协作编写,各章风格略有不同。
HN 上的人常用它来解释 monad、do 记法和惰性求值,有人称它是最好的 Haskell 整体入门,也有人说它被低估了,比 LYAH 更好读。
想学 Haskell 或搞懂 Monad 的程序员
怎么读
由 Claude 根据这本书和 HN 上的说法整理,可能有错- 1从基础章节开始顺序读,别急着跳到 Monad
- 2按 Functor、Applicative、Monad 的顺序读相关章节
- 3遇到不懂的概念再查对应的专题章节,如惰性求值
- 4边读边在 GHCi 里试代码
HN 书评
推荐在前,同类按时间 · 每本最多保留 20 条,统计用全部提及 · 作者本人贴的不算“Another good place to start would be Haskell. Real World Haskell is a good book, and there are several resources to get you started on the web ((链接), Haskell Wikibook ).”
“The Haskell wiki entry on modules is short, pretty complete, and has plenty of examples:”
“Then read this explanation of do notation:”
“The Haskell wikibook also has a fairly comprehensive chapter on laziness: Haskell Wikibook.”
“Another (much more detailed) discussion of it can be found here: Haskell Wikibook”
看全部 20 条 →
“I know there is a good chapter about it in the Haskell Wikibook.”
“the version of List's >>= function is much easier to understand here than the one I pulled out of GHC's library code.”
“and an introduction to category theory as it applies to Haskell [4].”
“No one's mentioned the wikibook. I've not read through it much, but a colleague found it far more readable than LYAH”
“I highly recommend "You could have invented Monads", it helped me a lot. I also recommend the Haskell Wikibook:”
“Someone on HN suggested this guide to Haskell a few days ago: Haskell Wikibook I'm finding it the first useful introduction to the language I've encountered.”
“p.s: Not being a Haskell guy, I had to use these resources to figure out wtf was going on; they might help you too:”
“The Wikibook[1] does a pretty good example of explaining what this looks like”
“Open books like the Haskell wikibook [1] tend to be concise since there's no need to create filler content.”
“This also helped: Haskell Wikibook”
“Functors and applicative functors precede monads in (pretentious cough) modern Haskell pedagogy, as championed by (thankfully non-pretentious) Learn You A Haskell, as well as the Haskell Wikibook. Reading the relevant chapters is a good start.:)”
“So, you may want to read these pages from Wikibooks in this order:”
“The following is a really good reference for understanding not just the difference between functors, applicatives, and monads, but also why each is more powerful than the one before it.”
“The Haskell Wikibook is an underrated resource: Haskell Wikibook”