I have a list of integer as input and i would like to store the intermediate result of every comparison in a scala match expression into a ListBuffer.How can i achieve that?
Below is the code that i have written.Currently i am only able to store the result of last comparison not the intermediate ones.

```
import scala.collection.mutable.ListBuffer
object HelloWorld {
  def main(args: Array[String]) {
    var stor = ListBuffer[String]()
    val inpLst = List(1, 2, 2, 2, 1)
    for (i <- inpLst) {
      stor = i match {
        case 1 => "ok"
        case 2 => "notok"
      }
    }
    println(stor)
  }
}

```

This is the output that i want.

```
opList = List("ok","notok","notok',"notok","ok")

```