Skip to content

Instantly share code, notes, and snippets.

@deepakmehra10
Created July 14, 2019 07:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deepakmehra10/bff6b05a0d75bdb1f50d75b1a78a6811 to your computer and use it in GitHub Desktop.
Save deepakmehra10/bff6b05a0d75bdb1f50d75b1a78a6811 to your computer and use it in GitHub Desktop.
//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