Write map's like this

    val i1 =  prev.partitions.view.map { p: Partition =>
      ....
    }