It all depends on the behavior that you want.

Do you want what's saved upon exit to be the value of your global `history` 
variable _at the time of exit_? Or do you want it to be the value at the time 
you called the `persistence()` proc?

If you use the `let history = history` trick, you're making a local copy, so it 
will be the value when `persistence()` is called.

If you want the value of the global `history` variable, then you either need to 
use the global variable itself or a `ref`. 

Reply via email to