O GoConqr está de visual novo! Conte para nós o que você achou.

Mapa mental

Chapter 8 - Making Our Own Types and Typeclasses

Jesús Henríquez Espanhol

Conteúdo do mapa

Chapter 8 - Making Our Own Types and Typeclasses

  1. Algebraic data types intro

    • For the creation of a type is the word "data"
      • For example, the bool type is defined the following way:
        • data Bool = False | True
  2. Record syntax

    • Similar to the creation of a POO object
      • data Person = Person String String Int Float String String deriving (Show)
  3. Type parameters

    • Data builders and type they can take parameters and produce a new value.
  4. Type synonyms

    • They are a way of defining that 2 types are equal and interchangeable, for example:
      • type String = [Char]
  5. A yes-no typeclass

    • Define a function
      • This function takes a value of any kind that can express some truth value and tells us if it is true or not.
  6. Kinds and some type-foo

    • We talk about type constructors take other types as parameters and end up producing specific types
      • Like the functions that take values ​​as parameters and return value

Informações

Descrição
Mapa Mental sobre Chapter 8 - Making Our Own Types and Typeclasses, criado por Jesús Henríquez em 23-09-2018.
Visualizações
0
Avaliação

Mais sobre Data Types and Typeclasses

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?