Y
Hacker News
new
|
ask
|
show
|
jobs
by
yorwba
3217 days ago
Or you could just make copies of state you want to keep before mutating it. Both mutable imperative code and immutable functional code can emulate each other, so which one to choose largely depends on your preferences.