If we consider a function foo depending on a and b. Would I then write a stateless function as follows:
MyClass
final b;
<returnType> foo(a) {...}
I am asking because foo would depend on the state of the MyClass-object. However, that state is final, and so foo will always return the same result for a given a.
Following the functional paradigm in a dogmatic way, i.e. letting functions only depend on their inputs/arguments, would mean that:
MyClass
<returnType> foo(a, b) {...}
Then, however, foo can be made static. So, would a dogmatic application of the functional style always lead to static methods?
Thank you!