What determines purity in func ?

a) must only read function params
b) can read values outside of function params and return value dependent on params
c) can read values outside of function params but return value must be independent of global data

In all three cases the function of course does not modify data outside of its scope

Apr 9, 2022, 6:08 PM

© 2024 Draquery.com All rights reserved.