Mapa mental
Higher-Order Functions
Conteúdo do mapa
Higher-Order Functions
Three Possibilities
- Take functions as parameters
- Return functions as parameters
- Both
Curried Functions
- By applying a space between two things
- Space considered as an operator
- Separated by arrows ->
- Partially Applied Functions
- Take the parameters you need
- Infix functions
- Parentheses plus parameter
Associations and Filters
- The function is taken and applied to each element
- Something new is produced
- Predicates
- If it is true, it is included
- Map and Filter
- One time only
- It is trimmed according to need
- Lists by Compression
- One time only
Lambdas
- Anonymous function
- It is only needed once
- To pass it to higher order function
- The sign \
- Parameters separated by space
- It is created: \ ... -> (...)
- Parameters separated by space
- Expressions
- They take any number of parameters
- Anonymous function
Folds
- Reduce lists to a single value
- Binary calls Accumulator
- So on
- It can be of any type
- Binary calls Accumulator
- Take a binary function
- An Initial Value or Accumulator
- List to fold
- An Initial Value or Accumulator
- To the left
- Finite
- To the right
- Infinite
- Reduce lists to a single value
$ Function
- Order of low precedence
- Associative on the right
- Replace Parenthesis
Composition of Functions
- They must have the same type of parameter
- Point Free Style
- Pass values easily
Informações
- Descrição
- Ingeniería Mapa Mental sobre Higher-Order Functions, criado por Daniel Almanza em 19-02-2018.
- Criado por
- Daniel Almanza
- Visualizações
- 0
- Avaliação
Mais sobre Functional Programming and Haskell