GoConqr has a new look! Let us know what you think.

Mind map

Chapter 8 - Making Our Own Types and Typeclasses

Jesús Henríquez Spanish

Map content

Chapter 8 - Making Our Own Types and Typeclasses

  1. Algebraic data types intro

    • For the creation of a type is the word "data"
      • For example, the bool type is defined the following way:
        • data Bool = False | True
  2. Record syntax

    • Similar to the creation of a POO object
      • data Person = Person String String Int Float String String deriving (Show)
  3. Type parameters

    • Data builders and type they can take parameters and produce a new value.
  4. Type synonyms

    • They are a way of defining that 2 types are equal and interchangeable, for example:
      • type String = [Char]
  5. A yes-no typeclass

    • Define a function
      • This function takes a value of any kind that can express some truth value and tells us if it is true or not.
  6. Kinds and some type-foo

    • We talk about type constructors take other types as parameters and end up producing specific types
      • Like the functions that take values ​​as parameters and return value

Information

Description
Mind Map on Chapter 8 - Making Our Own Types and Typeclasses, created by Jesús Henríquez on 23/09/2018.
Views
0
Rating

More on Data Types and Typeclasses

Feedback

What is it about?

What do you think of the new look?

How do you like it?