Hacker News new | ask | show | jobs
by Marazan 1115 days ago
Let me tell you your mind is going to be blown once you learn about Monads.

A mutable object is functionally identical to a return value if you control the initial state and lifetime of the object. Like you can do in a unit test.

And as I demonstrated in my other comment I 100% retained the semantic structure of the function whilst making it 100% unit testable.