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

Mapa mental

Make our own Types and Typeclasses

WILLIAM SANTIAGO FONSECA MORA Ingeniería Inglês

Make our own Types and Typeclasses

Conteúdo do mapa

Make our own Types and Typeclasses

  1. Word "data"

    • Allow us to define a new data type
      • Syntaxis
        • data "data_name" = "values" | "value2"
          • The "|" is an or
          • Both the type name and the value constructors have to be capital cased.
        • Value constructors
          • Are functions that return some data type
            • data "data_name" = "value_constructor_name" "parameter1" "parametern" | "value_constructor_name" "parameter1" "parametern"
            • We can operate over a value consctructor because is a function
              • Define the parameter of a type more generic, allow us to make the parameter of any type
  2. Defining types and typeclasses in a module

      • We define types like
        • "data_name"(..)
      • We can omit some value constructors
        • "data_name"
      • Import some specifics values constructors
        • "data_name"("value1", "valueN")
  3. Record syntax

    • Allow us to define a "name" to all the values of a type
  4. Type parameters

  5. Deriving

    • Make our data type inherit some behaviour of some typeclass
  6. Type synonym

    • GIve other name to any data type
      • type "name" = "data_type_name"
  7. Recurisive data structures

    • We can define value constructors that can have the same data type that we are defining
  8. Make typeclasses

    • Syntax
      • class 'Typeclass_name' 'type_value' where
        • The 'type_value' has to be a concrete type
    • Functor typeclass
      • Things that can be mapped over

Imagens e arquivos do mapa

  • Make our own Types and Typeclasses
  • Make our own Types and Typeclasses
  • Make our own Types and Typeclasses
  • Make our own Types and Typeclasses
  • Make our own Types and Typeclasses

Informações

Descrição
Ingeniería Mapa Mental sobre Make our own Types and Typeclasses, criado por WILLIAM SANTIAGO FONSECA MORA em 24-09-2021.
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?