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

Mindmap

Making your own data types and typeclasses

Santiago Cárdenas Englisch

Inhalt der Mindmap

Making your own data types and typeclasses

  1. Algebraic data types

    • We can use the keyword data to make our own data types, also we can use the keyword deriving (show) to make the type part of the Show typeclass
  2. Record Sintax

    • We can create whatever object we want with an sintax that is pretty similar to the sintax of the data in the modules
  3. Type parameters

    • We can also use parameters of any type in the construction of any object, using all the previous concepts we can create an even more generic object.
  4. Derived instances

    • Derived instances are like addons that can be added to our objects, so they can be some sort of things, like for example if we derive Eq we can compare, if we derive Show we can print, etc...
  5. Typeclasses

    • We can create our own typleclasses using the keyword class and creating our own rules for the typeclass
  6. Functor Typeclass

    • The functor typeclass can be used like the map function, but in this case the list can have any type of data, and the function will be applied in the corresponding data type that can be applied.

Informationen

Beschreibung
Mindmap am Making your own data types and typeclasses, erstellt von Santiago Cárdenas am 27/03/2019.
Erstellt von
Santiago Cárdenas
Aufrufe
0
Bewertung

Mehr zu Data Types and Typeclasses

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck