3 ms·
Is it then the variable (or the variable accessor) that is impure, or the function that is impure?
by grenoire 10y ago
Is it then the variable (or the variable accessor) that is impure, or the function that is impure?
- 14113 10y agoThe variable accessor is a function of type Variable -> Field, which the function sum is calling. Because of that, the function sum is impure, as it's calling an impure function. I would argue that the object is just a wrapper around a function, and in essence making the sum function implicitly higher order, as you're passing it a function to retrieve a value, rather than an actual value.