What is the pure function?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Studied at University of Cambridge, Lives in Cambridge, UK
A pure function is a function where the return value is only determined by its input values, without observable side effects. This is how functions in math work: Math.cos(x) will, for the same value of x , always return the same result. ... A given invocation of a pure function can always be replaced by its result.
2023-05-06 06:16:58
评论(499)
Helpful(122)
Helpful
Helpful(2)

Benjamin Gonzalez
QuesHub.com delivers expert answers and knowledge to you.
A pure function is a function where the return value is only determined by its input values, without observable side effects. This is how functions in math work: Math.cos(x) will, for the same value of x , always return the same result. ... A given invocation of a pure function can always be replaced by its result.