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

Mindmap

Syntax in Functions

CASTILLO ZAMBRANO LUIS FELIPE Spanisch

Syntax in Functions

Inhalt der Mindmap

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

Bilder und Dateien der Mindmap

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

Informationen

Beschreibung
Mindmap am Syntax in Functions, erstellt von CASTILLO ZAMBRANO LUIS FELIPE am 15/02/2018.
Aufrufe
1
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck