case m of Just x -> x Nothing -> 0