Skip to content

Instantly share code, notes, and snippets.

@alirezameskin
Last active February 12, 2019 07:24
Show Gist options
  • Save alirezameskin/634f6aacd1c949c551220fcd9552f535 to your computer and use it in GitHub Desktop.
Save alirezameskin/634f6aacd1c949c551220fcd9552f535 to your computer and use it in GitHub Desktop.
object TernaryApp extends App {
val ternary = Ternary[Boolean]
.insert("East Richmond", true)
.insert("East Eagle", true)
.insert("Richmond West", true)
.insert("Cheltenham", true)
.insert("Richmond VIC", true)
println(ternary.keys)
// List(Cheltenham, East Eagle, East Richmond, Richmond VIC, Richmond West)
println(ternary.keys("Rich"))
// List(Richmond VIC, Richmond West)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment