March 2018
Beginner
616 pages
16h 53m
English
After reading lesson 14, you’ll be able to
In lesson 13, you got your first look at type classes, which are Haskell’s way of grouping types by common behaviors they share. In this lesson, you’ll take a deeper look at how to implement existing type classes. This will allow you to write new types that take advantage of a wide range of existing functions.
You have a data type consisting of data constructors for New England states:
data NewEngland = ME | VT | NH | MA | RI | CT
You want to be able to display them by their full name by using Show. You ...