What's the best way to have duplicate branches in ...
# getting-started
d
What's the best way to have duplicate branches in a
when
statement? I have a
when
statement on an enum and want to do something like:
Copy code
val myEnum: MyEnum? = ...
return when (myEnum) {
  A, B, C -> 1
  D, E -> 2
  null -> 3