GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Mindmap

Making Our Own Types and Typeclasses

JUAN DAVID PARDO REINA Spanisch

Inhalt der Mindmap

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

Informationen

Beschreibung
Mindmap am Making Our Own Types and Typeclasses, erstellt von JUAN DAVID PARDO REINA am 30/03/2019.
Aufrufe
0
Bewertung

Mehr zu Data Types and Typeclasses

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck