Skip to content

Instantly share code, notes, and snippets.

@windmaomao
Last active September 18, 2020 17:43
Show Gist options
  • Save windmaomao/b876a4f2a96ef26bb1c333008300cb3d to your computer and use it in GitHub Desktop.
Save windmaomao/b876a4f2a96ef26bb1c333008300cb3d to your computer and use it in GitHub Desktop.
// Map char into a int
private fun charValue(c: Char): Int = when (c) {
'(' -> 1
')' -> -1
else -> 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment