Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- object SetApp extends App with ScalaTion
- {
- val set1 = Set(1, 2, 3, 4)
- val set2 = Set(1.0, 2.0, 3.0, 4.0)
- val setTest1 = 2 ∈ set1 // true
- val setTest2 = 5 ∈ set1 // false
- val setTest3 = 2.0 ∈ set2 // true
- println("set1 = %s".format(set1))
- println("set2 = %s".format(set2))
- println("2 ∈ set1 = %s".format(setTest1))
- println("5 ∈ set1 = %s".format(setTest2))
- println("2 ∈ set2 = %s".format(setTest3))
- }
Add Comment
Please, Sign In to add comment