fn x y = case (x, y) of (Just q, Just z) -> q + z (_, _) -> 0
At the same level, really - it works in a let or a where as well.