Difference between revisions of "Pure function"

From CS 61A Wiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
(Redirected page to Pure vs. non-pure function)
 
Line 1: Line 1:
#REDIRECT [[Pure vs. non-pure function]]
+
A '''pure function''' just returns a value. Given the same arguments, it returns the same value. An example is the <code>add</code> function.

Revision as of 13:43, 25 May 2014

A pure function just returns a value. Given the same arguments, it returns the same value. An example is the add function.