Skip to content

Instantly share code, notes, and snippets.

@indongyoo
Last active April 3, 2018 12:14
Show Gist options
  • Save indongyoo/d0571b50cbeac9df4d1b788feeec74b4 to your computer and use it in GitHub Desktop.
Save indongyoo/d0571b50cbeac9df4d1b788feeec74b4 to your computer and use it in GitHub Desktop.
const { match } = Functional;
const a = 2;
const b = match (a)
.case(1) (_=> '1이군요!')
.case(2) (_=> '2네요?')
.else (_=> '1도 2도 아니군요.');
console.log(b);
// 2네요?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment