Gestalte GoConqr mit. Was sollen wir als Nächstes hinzufügen?

Mindmap

secondPart_<The syntax of functions>

Nicolas Acosta Spanisch

Inhalt der Mindmap

secondPart_<The syntax of functions>

  1. pattern matching

    • We can separate the body that defines the behavior of a function in several parts
      • lucky :: (Integral a) => a -> String lucky 7 = "¡El siete de la suerte!" lucky x = "Lo siento, ¡no es tu día de suerte!"
    • if
  2. _

    • Intencional list
  3. x:xs

    • Recursive functions
  4. patterns

    • @
      • capital :: String -> String capital "" = "¡Una cadena vacía!" capital all@(x:_) = "La primera letra de " ++ all ++ " es " ++ [x]
    • we cant use
      • (xs ++ ys)
  5. guards

    • the guards are a way to check if any property of a value (or several of them) is true or false
    • The guards are indicated with vertical bars that follow the name of the function and its parameters. They usually have a sangria and are aligned
    • A guard is basically a Boolean expression. If True is evaluated, then the body of the corresponding function is used
  6. Let it be

    • Let
      • they serve to link variables anywhere and are expressions in themselves
    • where
      • they are a syntactic construction that lets you link variables at the end of a function so that the whole function can access it
  7. case

    • It is very similar to other programming languages

Informationen

Beschreibung
Mindmap am secondPart_<The syntax of functions>, erstellt von Nicolas Acosta am 26/02/2018.
Erstellt von
Nicolas Acosta
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Was sollen wir als Nächstes hinzufügen?