bindAlt :: (t -> t') -> (a -> Term t' b) -> Alt t (Term t) a -> Alt t' (Term t') b
bindAlt f g (Alt p gs) =
  let s (Scope b) = Scope $ bimap f (fmap $ bindTerm f g) b in
    Alt (fmap f p) (fmap s gs)
bindAlt :: (t -> t') -> (a -> Term t' b) -> Alt t (Term t) a -> Alt t' (Term t') b
bindAlt f g (Alt p gs) =
  let s (Scope b) = Scope $ bimap f (fmap $ bindTerm f g) b in
    Alt (fmap f p) (fmap s gs)
bindAlt f g (Alt p gs) =
  let s (Scope b) = Scope $ bimap f (fmap $ bindTerm f g) b in
    Alt (fmap f p) (fmap s gs)