Suppose I have a haskell expression, for example:
foo (Nothing, Just a) = bar a foo (Just a, Nothing) = bar a
Is there any haskell syntax to collapse these cases, so I can match any pattern and specify bar a as the answer for both? Or is it as brief as I can understand it?
syntax pattern-matching haskell
rampion
source share