re: Functional programming basics part 1: Pure function VIEW POST

VIEW PARENT COMMENT VIEW FULL DISCUSSION

Purity simply means:

  • no side-effects
  • same output for input

If a function returns void and has no side-effects, it's pure, but it also doesn't do anything interesting.

code of conduct - report abuse