How could I use scalacheck to see if each item in a list has been incremented correctly. The function added just adds 5 to it's parameter.Where I labeled problem area isn't working, how could I make it better to check each element of one list against anothe?
val added = forAll { (a:Array[Int]) => {
val l=added(a)
all(
"size" |: a.size==l.size,
"sort/elements" |: for(i<-0 to a.size) a(i)+5==l(i) //problem area
)
}
}