Reports the usage of fold
to check a condition for all elements.
The quick-fix replaces the fold
with an equivalent forall
.
Example:
var x: Seq[Int]
x.foldLeft(true)((x,y) => x && p(y))
After the quick-fix is applied:
var x: Seq[Int]
x.forall(y => p(y))