Mind map
Making Our Own Types and Typeclasses
Map content
Making Our Own Types and Typeclasses
Algebraic data types
- Bool, Int, Char, Maybe, etc.
How do we make our own?
- one way is to use the data keyword to define a type.
Type parameters
- A value constructor can take some values parameters and then produce a new value
- For instance, the Car constructor takes three values and produces a car value
- A value constructor can take some values parameters and then produce a new value
Derived instances
- A type can be made an instance of a typeclass if it supports that behavior.
Information
- Description
- Mind Map on Making Our Own Types and Typeclasses, created by Andres Diaz on 23/09/2018.
- Created by
- Andres Diaz
- Views
- 0
- Rating
More on Data Types and Typeclasses