Learn You a Haskell for Great Good! is a fun, illustrated guide to learning Haskell, a functional programming language that's growing in popularity. Learn You a Haskell for Great Good! introduces programmers familiar with imperative languages (such as C++, Java, or Python) to the unique aspects of functional programming. Packed with jokes, pop culture references, and the author's own hilarious artwork, Learn You a Haskell for Great Good! eases the learning curve of this complex language, and is a perfect starting point for any programmer looking to expand his or her horizons. The well-known web tutorial on which this book is based is widely regarded as the best way for beginners to learn Haskell, and receives over 30,000 unique visitors monthly.
About the Author
Miran Lipovaca is a computer science student in Ljubljana, Slovenia. His online tutorial, "Learn You a Haskell for Great Good!," is widely regarded as the best way to learn Haskell.
......(更多)
Miran Lipovaca is a computer science student in Ljubljana, Slovenia. His online tutorial, "Learn You a Haskell for Great Good!," is widely regarded as the best way to learn Haskell.
......(更多)
Introduction
Chapter 1: Starting Out
Chapter 2: Believe the Type
Chapter 3: Syntax in Functions
Chapter 4: Hello Recursion!
Chapter 5: Higher-Order Functions
Chapter 6: Modules
Chapter 7: Making Our Own Types and Type Classes
Chapter 8: Input and Output
Chapter 9: More Input and More Output
Chapter 10: Functionally Solving Problems
Chapter 11: Applicative Functors
Chapter 12: Monoids
Chapter 13: A Fistful of Monads
Chapter 14: For a Few Monads More
Chapter 15: Zippers
......(更多)
_ means that we don't care what we'll draw from the list anyway so instead of writing a variable name that we'll never use, we just write _.
我们看到如何在函子值上映射“多参数”函数得到函数值的函子值。我们能对它做什么吗?对于一个参数,我们可以映射一个函数,它接受某个函数为参数,给这个函数应用一个参数。因为函子值里的任何东西都会被作为参数传递给我们的函数。
Function application has the highest precedence of all the operations in Haskell. In other words, these two statements are equivalent.
......(更多)