reading-notes

Functional Programming

Functional Programming Concepts

Functional Programming Concepts

  1. What is functional programming? Functional programming is a programming paradigm — a style of building the structure and elements of computer programs — that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data — Wikipedia

  2. So how do we know if a function is pure or not? Here is a very strict definition of purity:

It returns the same result if given the same arguments (it is also referred as deterministic) It does not cause any observable side effects

  1. It returns the same result if given the same arguments

  2. immutrablility is something that cannont be changed

  3. pure functions + immutable data = referential transparency

Videos

Node JS Tutorial for Beginners #6 - Modules and require

  1. a module is like a component
  2. require is a global function. its like import in React
  3. you use require
  4. you use .export on the module