I think REPLs work better in languages that provide 1st class immutability support, since it's easier to set up state once, then play with functions without having to re-set up state every time you tinker.
I think REPLs work better in languages that don't provide 1st class immutability support, since it's easier to change state, then play with functions without having to re-set up state every time you tinker.
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.