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

Mapa mental

Making Our Own Types and Typeclasses

JUAN SEBASTIÁN JIMÉNEZ NIETO Español

Contenido del mapa

Making Our Own Types and Typeclasses

  1. Algebraic data types intro

    • data types
      • Bool
      • Int
      • Char
      • Maybe
  2. Record syntax

    • Store information
      • data values
    • Getters and Setters
    • Status function
  3. Type parameters

    • constructor
      • values parameters
      • produce new values
    • Values can arrays
    • Parameters containin more data
    • parameterized data
    • in Haskell to never add typeclass constraints in data declarations.
  4. Derived instances

    • Typeclasses 101
      • typeclass
        • sort of an interface that defines some behavior
    • functions defined by the typeclasses
    • typeclasses
      • Eq
      • Ord
      • Enum
      • Bounded
      • Show
      • Read
      • just
  5. Type synonyms

    • types are equivalent and interchangeable
    • giving some types different
    • distinction between type constructors and value constructors
      • Either
      • Maybe
      • Nothing
  6. Recursive data structures

    • constructors have fields that are of the same type
      • recursive data types
    • constructor
      • cons
    • define functions as operators
  7. Typeclasses 102

    • our own typeclasses
    • types instances of our typeclasses
    • cicles
      • for
      • where
        • Eq
    • instance keyword.
      • defining new typeclasses and instance
    • subclasses of other typeclasses
  8. A yes-no typeclass

    • strictly using Bool
    • boolean semantics works
      • tells us for sure if it's true or not
    • takes one value
  9. The Functor typeclass

    • things that can be mapped over
    • fmap
      • can hold
        • Int
        • Char
        • Bool
    • works only on lists
    • is just map
    • Types that can act like a box can be functors
  10. Kinds and some type-foo

    • types are applied to type constructors
    • kinds
      • little labels
    • mapped the f over the first field

Información

Descripción
Mapa Mental sobre Making Our Own Types and Typeclasses, creado por JUAN SEBASTIÁN JIMÉNEZ NIETO el 23/09/2018.
Visitas
0
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?