March 2018
Beginner to intermediate
458 pages
10h 34m
English
In functional programming, a function is referred to as a pure function if all its input arguments are known and all its output results are also well known and declared; or we can say the input and output result has no side-effects. Now, you must be curious to know what the side-effect could be, let's discuss it.
Let's look at the following example:
Public int sum(int x){return x+x; }
In the previous example, the function sum takes an integer input and returns an integer value and predefined result. This kind of function is referred to as a pure function. Let's investigate the following example:
Public void verifyData(){ Employee emp = OrgQueue.getEmp(); If(emp != null) { ProcessForm(emp); }}
In the preceding example, the verifyData() ...
Read now
Unlock full access