# reset!
Set a ref cell to a new value, returning the new value. Fires any
registered watchers with `(key cell old new)`. `def` rebinding a binding
cell's root does NOT fire watchers.
## Syntax
[reset! $a $val]
## Parameters
- `$a` — A ref cell (anonymous ref or `[var x]` binding cell).
- `$val` — New value to store.
## Examples
def counter [ref 0] [reset! $counter 10] # 10 [deref $counter] # 10
## Returns
The new value (any type).
## See Also
`swap!`, `deref`, `ref`, `add-watch`