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

Mapa mental

Making Our Own Types and Typeclasses

ESGUERRA TAVERA CARLOS JOSE Español

Contenido del mapa

Making Our Own Types and Typeclasses

  1. Algebraic data types intro

    • module
      • functions between commas
      • ending with,where
  2. Record syntax

    • Create a data type that decribes something and stores it
      • example
        • information of a person(name,lastname,age,gender,etc)
  3. 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
  4. Derived instances

    • Derive other functions to use in a data type
  5. Type synonyms

    • types that are equivalent
      • Example
        • type Phone=String then Phone and String are the same
  6. Recursive data structures

    • we can make types whose constructors have fields that are of the same type! Using that, we can create recursive data types, where one value of some type contains values of that type, which in turn contain more values of the same type and so on
  7. Typeclasses 102

    • typeclasses are like interfaces. A typeclass defines some behavior (like comparing for equality, comparing for ordering, enumeration) and then types that can behave in that way are made instances of that typeclass
    • yes-no Typeclasses
      • It is similar to the if,else conditionals in java

Información

Descripción
Mapa Mental sobre Making Our Own Types and Typeclasses, creado por ESGUERRA TAVERA CARLOS JOSE el 20/09/2019.
Creado por
ESGUERRA TAVERA CARLOS JOSE · sep 2019
Actualizado
20 sep 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?