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.

Computer Science & Information Technology

You might also like to view...

If you want to search for customers who meet certain criteria, such as those who live in specific states, you would type ________ ("Arizona", "Nevada", "New Mexico") as the criterion in the State field

A) Not B) Not Between...And C) In D) Between...And

Computer Science & Information Technology

The ________ element creates a horizontal rule

Fill in the blank(s) with correct word

Computer Science & Information Technology