Which of the following statements is false?
a. In pure functional programming languages you focus on writing pure func-tions. A pure function’s result depends only on the argument(s) you pass to it. Also, given particular arguments, a pure function always produces the same result. For example, built-in function sum’s return value depends only on the iterable you pass to it.
b. Pure functions can have side effects—for example, if you pass a mutable list to a pure function, the list can contain different values before and after the function call.
c. The following session demonstrates that when you call the pure function sum, it does not modify its argument.
In [1]: values = [1, 2, 3]
In [2]: sum(values)
Out[2]: 6
In [3]: sum(values) # same call always returns same result
Out[3]: 6
In [4]: values
Out[4]: [1, 2, 3]
d. Functions are objects that you can pass to other functions as data.
b. Pure functions can have side effects—for example, if you pass a mutable list to a pure function, the list can contain different values before and after the function call.
You might also like to view...
Which modifier must be used in the declaration of a variable to make it a constant?
a) public b) final c) static d) void e) private
In a URL, folders and filenames are separated by ____.
A. slashes (/) B. backward slashes (\) C. asterisks (*) D. pound signs (#)
Describe how the protocols in the TCP/IP suite are organized and list the layers.
What will be an ideal response?
The first time a file is saved the Save As dialog box will ALWAYS appear
Indicate whether the statement is true or false