Post

Pure Function

Pure Function

컴퓨터 프로그래밍에서 순수함수(pure function)이란, 다음과 같은 속성을 갖는다.

  1. 함수가 같은 어규먼트(입력)에 대해서 항상 같은 리턴값(결과)를 낸다.
  2. 함수의 평가는 사이드 이팩트가 없다.

References

  • https://en.wikipedia.org/wiki/Pure_function
  • https://jeong-pro.tistory.com/23
  • https://evan-moon.github.io/2019/12/29/about-pure-functions/
  • https://www.freecodecamp.org/news/what-is-a-pure-function-in-javascript-acb887375dfe/
  • https://www.sitepoint.com/functional-programming-pure-functions/
  • https://blog.bitsrc.io/basics-of-javascript-pure-functions-3e6f3437066
  • https://programmingwithmosh.com/javascript/what-are-pure-functions/
  • https://stackoverflow.com/questions/58744557/is-this-a-pure-function
  • https://elmprogramming.com/pure-functions.html
  • https://www.sitepoint.com/functional-programming-pure-functions/
This post is licensed under CC BY 4.0 by the author.