Functional Programming

What is it?

“Refactor what you know about programming”

Functional programming is just another paradigm of organising your existing variables, ifs, loops, namespaces, arrays, data structures etc., in a different way than OOP

Inspiration

From mathematical functions.
For a given input to a function, always produce the same output

Rules

  1. All functions must be Pure Functions
  2. All variables must be immutable
  3. The language should include appropriate bridges to perform operations side_effects

Languages

  1. Haskell
  2. Clojure

Advantages

  1. Useful for implementation of multi threaded program

See how category_theory relates to this