A Pure Function

  • Has no side-effects
  • Produces outputs only based on inputs (and maybe constants)
  • Is easy to test
  • Easier to reason about
  • Can't be interfered with
  • Is always thread-safe

17 / 22