¡GoConqr estrena diseño! Cuéntanos qué te parece.

Mapa mental

Making Our Own Types and Typeclasses

JUAN DAVID PARDO REINA Español

Contenido del mapa

Making Our Own Types and Typeclasses

  1. Algebraic data types intro

  2. Data

    • defining a new data type
  3. |

    • Constructor
  4. deriving

  5. module

    • write funcions between commas
      • Ending with, where
  6. Record syntax

    • we've been tasked with creating a data type that describes a person. The info that we want to store about that person is: first name, last name, age, height, phone number, and favorite ice-cream flavor.
  7. Type parameters

    • A value constructor can take some values parameters and then produce a new value
    • type constructors can take types as parameters to produce new types
  8. Derived instances

    • typeclass is a sort of an interface that defines some behavior
    • A type can be made an instance of a typeclass if it supports that behavior
  9. Type synonyms

    • types are equivalent and interchangeable
    • ype synonyms don't really do anything per se, they're just about giving some types different names so that they make more sense to someone reading our code and documentatio
  10. Recursive data structures

    • a constructor in an algebraic data type can have several (or none at all) fields and each field must be of some concrete type. With that in mind

Información

Descripción
Mapa Mental sobre Making Our Own Types and Typeclasses, creado por JUAN DAVID PARDO REINA el 30/03/2019.
Visitas
0
Valoración

Más sobre Data Types and Typeclasses

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?