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

Mapa mental

Syntax in Functions

CASTILLO ZAMBRANO LUIS FELIPE Espanhol

Syntax in Functions

Conteúdo do mapa

Syntax in Functions

  1. Pattern matching

    • when creating a function, the body can separate into patterns
    • You can pattern match on any data type
    • unordered sentences in patterns might generate infinite loops
      • we should always include a general pattern
        • _ any data from the list
    • you have to define the patterns for whatever entrance
  2. The lists themselves can also use patterns.

  3. Guards, guards!

    • The guards are a way to check if any property of a value (or several of them) is true or false.
    • the patterns are usually used with the guards
      • if all the guards of a pattern are executed and they are false, we continue with the following pattern
    • they follow the name of a function and its parameters
    • has a little bleeding to the right and aligned
    • A guard is basically a Boolean expression
      • it is discouraged to write guards online are not very readable
  4. where is located after the guards to calculate a varibale and then that variable compare it using the guards

    • it is best to apply sangria
    • The names that we define in this section are only visible for that function
    • the variables must be aligned correctly
    • If you want multiple patterns of a function to access a shared name, you must define it globally.
  5. Where bindings are a syntactic construct that let you bind to variables at the end of a function and the whole function can see them, including all the guards.

    • The names that you define in the let part are accessible to the expression after the in part
    • If we want to link several variables online, obviously we can not align them in columns That's why we can separate them with semicolons.
  6. Case expressions

Imagens e arquivos do mapa

  • Syntax in Functions
  • Syntax in Functions
  • Syntax in Functions
  • Syntax in Functions

Informações

Descrição
Mapa Mental sobre Syntax in Functions, criado por CASTILLO ZAMBRANO LUIS FELIPE em 15-02-2018.
Visualizações
1
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?