Instead of introducing an intermediate collection with the `filter`, perhaps just do it all in the `foreach`:

```scala
  val (response, successes) = r
  stores.zipWithIndex.foreach { case (s, i) =>
    if (!successes.contains(i)) s.put(k, response)
  }
```