Mindmap
Making Our Own Types and Typeclasses
Inhalt der Mindmap
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.
Informationen
- Beschreibung
- Mindmap am Making Our Own Types and Typeclasses, erstellt von Andres Diaz am 23/09/2018.
- Erstellt von
- Andres Diaz
- Aufrufe
- 0
- Bewertung
Mehr zu Data Types and Typeclasses