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

Mindmap

secondPart_<Higher order functions>

Nicolas Acosta Spanisch

Inhalt der Mindmap

secondPart_<Higher order functions>

  1. Currified functions

    • call two parameters
  2. ->

    • take and return
    • naturally associative by right
  3. infix functions

  4. Higher order in your order

    • Functions can take functions as parameters and also return functions
  5. Associations and filters

    • predicate
      • function that says if something is true or false
    • map :: (a -> b) -> [a] -> [b] map _ [] = [] map f (x:xs) = f x : map f xs
    • filter :: (a -> Bool) -> [a] -> [a] filter _ [] = [] filter p (x:xs) | p x = x : filter p xs | otherwise = filter p xs
  6. Lambdas

    • Lambdas are anonymous functions that are usually used when we need a function only once
    • \
      • (\xs -> length xs > 15)
  7. Folds and origami

    • Folds can be used to implement any function that traverses a list, item by item, and then return a value.
      • Whenever you want to go through a list and return a value, there are possibilities of using a fold
    • a fold takes a binary function, an initial value and a list to fold
  8. $

    • Basically it is a function of convenience that we use to avoid having to write many parentheses
      • map a list of functions
  9. Composition of functions

    • is to perform a composition of functions with the previous function

Informationen

Beschreibung
Mindmap am secondPart_<Higher order functions>, erstellt von Nicolas Acosta am 01/03/2018.
Erstellt von
Nicolas Acosta
Aufrufe
0
Bewertung

Mehr zu Functional Programming and Haskell

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck