I wouldn’t refactor it. Yes, you could use a case, cond, or with, but I don’t think any of them bring clarity over what you have. You only have 2 cases and your conditions are boolean.
I wouldn’t refactor it. Yes, you could use a case, cond, or with, but I don’t think any of them bring clarity over what you have. You only have 2 cases and your conditions are boolean.