Or `keepJust a sa = lift (just a) (keepIf isJust Nothing sa)`. I think that would work.