Functional Programming Flashcards
What is a Function?
A function is a subroutine that carries out a set of instructions and returns a value.
What is Functional Programming?
Functional programming is a paradigm based on the use of functions to determine variables, where functions use expressions similar to mathematical expressions to calculate the value of a variable.
What is immutable?
that the function only changes the state or value of input data at the time the function is executed
What are side effects?
in procedural languages that are mutable and have the side effect that changing the state of a variable may impact on how the program is executed. Functional programs are immutable so do not suffer from this side effect.
What is statelessness?
Statelessness, which means each function is calculated with no reliance on any data other than which was passed as function inputs; there is no dependence upon events that happened previously in a program’s execution.
What are high order functions?
Higher-order functions are functions that either take other functions as an input (or argument) or return a function as an output.