http://blog.codefx.org/java/switch-expressions/
result = switch (foo) {
case bar -> baz;
case bar2 -> baz2;
};
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/switch-expression
result = foo switch
{
bar => baz,
bar2 => baz2,
};
https://kotlinlang.org/docs/reference/control-flow.html#when-expression
result = when(foo) {
bar -> baz
bar2 -> baz2
}
https://docs.ruby-lang.org/en/2.4.0/syntax/control_expressions_rdoc.html#label-case+Expression (not documented)
result = case foo
when bar
baz
when bar2
baz2
end
https://www.datamentor.io/r-programming/switch-function/
result <- switch(foo, bar = baz, bar2 = baz2)
https://doc.rust-lang.org/stable/rust-by-example/flow_control/match.html
result = match foo {
foo => bar,
foo2 => bar2,
};
https://docs.scala-lang.org/tour/pattern-matching.html
result = x foo {
case bar => baz
case bar2 => baz2
}