(1 to folds) is preferred, your style is fine though we use 2 space wrapped indents instead of 4. Would this be possible, though?
```
(1 to folds).map { fold => (
  new PartitionwiseSampledRDD(rdd, 
    new BernoulliSampler[T]((fold - 1) / foldsF, fold / foldsF, complement = false), seed),
   ...
)}.toList
```

anyway up to you but that way avoids breaking a line in a nested expression.