You are checking for a list containing the companion objects Int and Boolean These are not the same as the classes Int and Boolean Use a Typed Pattern instead val result: OptionListAny = ... result match { case Some(List(_: Int, _: Boolean, _: Int)) => println("found") case _ => println("not found") } Scala Reference Section 8.1 describes the different patterns you can use.
You are checking for a list containing the companion objects Int and Boolean. These are not the same as the classes Int and Boolean. Use a Typed Pattern instead.
Val result: OptionListAny = ... result match { case Some(List(_: Int, _: Boolean, _: Int)) => println("found") case _ => println("not found") } Scala Reference, Section 8.1 describes the different patterns you can use.
The following also works for Scala 2.8 List(1, true, 3) match { case List(a:Int, b:Boolean, c:Int) => println("found") case _ => println("not found") }.
The first problem is that the get method returns an Option: scala> val result = hash. Get("test") result: OptionListAny = Some(List(1, true, 3)) So you'd need to match against Some(List(...)), not List(...). Next, you are checking if the list contains the objects Int, Boolean and Int again, not if it contains objects whose types are Int, Boolean and Int again.Int and Boolean are both types and object companions.
Consider: scala> val x: Int = 5 x: Int = 5 scala> val x = Int x: Int. Type = object scala.Int scala> val x: Int = Int :13: error: type mismatch; found : Int. Type (with underlying type object Int) required: Int val x: Int = Int ^ So the correct match statement would be: case Some(List(_: Int, _: Boolean, _: Int)) => println("found").
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.