Re:Clear is better than clever [pdf]
by Schattenbaer on Monday May 06, 2019 @11:45AM
(#19840445)
I have also seen switch statements used (abused?) to do a similar thing. Since a switch executes the first statement that is equivalent to the control expression you can pass true as the control expression, e.g.:
Elixir has cond that does this nicely without resorting to strange switch statements:
https://elixir-lang.org/getting-started/case-cond-and-if.htm...