sum-types icon indicating copy to clipboard operation
sum-types copied to clipboard

Match multiple branches

Open samhh opened this issue 2 years ago • 0 comments

A limitation of our object-based matching API is that an equivalent to the following isn't possible:

case x of
  A, B -> etc
  C    -> etc
switch (x) {
  case A:
  case B:
    return etc;
  case C:
    return etc;
}

samhh avatar Apr 06 '22 14:04 samhh