April 2017
Intermediate to advanced
316 pages
9h 33m
English
In function definition, parameters follow the function name and they are constants by default so we will not be able to alter them inside the function body.
Parameters should be inside parentheses. If we do not have any parameters, we simply put open and close parentheses without any characters between them as follows:
func functionName() { }
In FP, it is important to have functions that have at least one parameter. Remember, a function in mathematics is a relation between a set of inputs and outputs. So, we always have at least an input in a function and the same principle applies to FP.
As you'll already know or have guessed, we can have multiple parameters in function definition. Parameters are ...
Read now
Unlock full access