Undo the most recent change in a spec_history stack
Value
A list with spec, diff, label, can_undo, and can_redo, or
NULL if already at the earliest snapshot.
Examples
s1 <- new_spec_ir(hierarchy = list(levels = 1L, n_obs = 100L))
h <- spec_history(s1)
history_push(h, new_spec_ir(hierarchy = list(levels = 1L, n_obs = 250L)))
res <- history_undo(h)
res$spec$hierarchy$n_obs
#> [1] 100
