Functional Programming Concepts

Functional Programming Concepts


  1. Purity

    • Pure functions only operate on its input parameters.

    • No side effects.

  2. Immutability

    • There are no variables in FP

    • Loops are implemented via recursion

  3. Higer Order Functions

    • Higher order functions take functions as parameter or returns a function or does both.
  4. Closure

    • A closure is a functions scope kept alive by a reference to that function.
  5. Function Composition

    • Put together reusable functions to compose new functions.

    • More like the concept of composite function f(g(x)) from math.

  6. Point Free Notation

    • In this notation, no need to specify parameters when writing functions.
  7. Currying

    • A curried function is a function that takes only one parameter at a time.

    • This helps make functions more generalized for reuse.

Summarised from here