Skip to Content
Learn You a Haskell for Great Good!
book

Learn You a Haskell for Great Good!

by Miran Lipovaca
April 2011
Beginner
400 pages
12h 45m
English
No Starch Press
Content preview from Learn You a Haskell for Great Good!

Chapter 11. Applicative Functors

Haskell’s combination of purity, higher-order functions, parameterized algebraic data types, and type classes makes implementing polymorphism much easier than in other languages. We don’t need to think about types belonging to a big hierarchy. Instead, we consider what the types can act like and then connect them with the appropriate type classes. An Int can act like a lot of things—an equatable thing, an ordered thing, an enumerable thing, and so on.

Type classes are open, which means that we can define our own data type, think about what it can act like, and connect it with the type classes that define its behaviors. We can also introduce a new type class and then make already existing types instances of it. Because ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Effective Haskell

Effective Haskell

Rebecca Skinner
Learning Go

Learning Go

Jon Bodner

Publisher Resources

ISBN: 9781457100406Errata Page