patternToExtractLambdas testEx (L1.L1PatternProduct ss args) ifEx =
  foldM (\oldIfEx (label, pattern) ->
          patternToExtractLambdas (L1.L1ExApply ss (L1.L1ExProject ss label) testEx) pattern oldIfEx)
        ifEx args
patternToExtractLambdas testEx (L1.L1PatternProduct ss args) ifEx =
  foldM (\oldIfEx (label, pattern) ->
          patternToExtractLambdas (L1.L1ExApply ss (L1.L1ExProject ss label) testEx) pattern oldIfEx)
        ifEx args
patternToExtractLambdas testEx (L1.L1PatternProduct ss args) ifEx =
  foldM (\oldIfEx (label, pattern) ->
          patternToExtractLambdas (L1.L1ExApply ss (L1.L1ExProject ss label) testEx) pattern oldIfEx)
        ifEx args