From CS 61A Wiki
Revision as of 16:08, 25 May 2014 by Axis
A pure function produces no effects other than returning a value. Its return value depends only on the inputs. Given the same arguments, it always returns the same value.
Contrast a pure function with a non-pure function.
addalways returns the sum of the arguments and has no side effects.