Ref in Cats-effect or Zio requires to work with immutable value over the mutable references, because of the underlying java compareAndSet from AtomicReference, I wonder if it is the case with TVar with cats-stm ?
Yes, TVar is still analogous to using a var
in imperative code, so the type should be immutable