Skip to main content
Pete's user avatar
Pete's user avatar
Pete's user avatar
Pete
  • Member for 13 years, 11 months
  • Last seen more than a week ago
revised
Is a memoized pure function itself considered pure?
Rephrase "relevant global state" with "observable side effects", which I believe to be a more precise wording. E.g., I wouldn't generally consider data that has been successfully written to an output stream part of "global state", but I would consider it an "observable side effect".
Loading…
awarded
awarded
awarded
awarded
revised
Loading…
awarded
answered
Loading…
awarded
awarded
awarded
awarded
awarded
comment
Solutions for polyadic functions/methods
I might at some point write a "real" answer if I get the time, but I have two points: You phrase this question as how to pass all this information to the function cleanly, but I think you should look at if it is the function itself that needs all this data because it is doing too much? But without a more concrete example, it's difficult to tell. Secondly, the type of object you are referring to, I would call a "Request Object". There are good uses for a such, but I normally only use them at the outer boundaries of the system. That didn't seem to be the case in your scenario.
awarded
awarded
awarded
awarded
awarded
1
2 3 4 5
20