∀ {α : Type u} {β : Type v} {cmp : α → α → Ordering} {t : Std.TreeMap α β cmp} [Std.TransCmp cmp] [Inhabited α]
  {k fallback : α} {f : Option β → Option β},
  (t.alter k f).getKeyD k fallback = if (f t[k]?).isSome = true then k else fallback