Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
//conditional pattern
String conditional = Match(1).of(
Case($(is(1)),i -> "one" +i),
Case($(is(2)),i -> "two" + i),
Case($(),"default")
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment