Skip to Content
Get Programming with Haskell
book

Get Programming with Haskell

by Will Kurt
March 2018
Beginner
616 pages
16h 53m
English
Manning Publications
Content preview from Get Programming with Haskell

Lesson 16. Creating types with “and” and “or”

After reading lesson 16, you’ll be able to

  • Understand product types in various programming languages
  • Use sum types to model problems in new ways
  • Think beyond hierarchical program design

In this lesson, you’ll take a closer look at some of the types we’ve already covered. You’ll do this so you can learn more about what makes Haskell’s types unique and how to design programs using types. Most of the types you’ve seen so far are algebraic data types. Algebraic data types are any types that can be made by combining other types. The key to understanding algebraic data types is knowing exactly how to combine other types. Thankfully, there are only two ways. You can combine multiple types with an

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

Get Programming with Go

Get Programming with Go

Nathan Youngman, Roger Peppe
Effective Haskell

Effective Haskell

Rebecca Skinner

Publisher Resources

ISBN: 9781617293764Publisher SupportOtherPublisher WebsiteSupplemental ContentErrata PagePurchase Link