alexandru / scala-best-practices

A collection of Scala best practices
4.39k stars 623 forks source link

start date on same line + use high order functions in examples #1

Closed MasseGuillaume closed 10 years ago

alexandru commented 10 years ago

Thanks for your contribution @MasseGuillaume,

BTW - those are real lines I copy/pasted from a project, to feel more real :-) I'll integrate those changes, but only for the corrected versions.

What do you think?

alexandru commented 10 years ago

@MasseGuillaume, I integrated your changes with 2 corrections.

One is that I placed the start = where it was, this is because that's the actual output that I got from IntelliJ IDEA and it was illustrative of the fact that a plugin doesn't always chose wisely what to do:

+    val dp = new DispatchPlan(Set(filteredAssets), start =
+      startDate, end = endDate, product, scheduleMap, availabilityMap,

Second one is that I reverted the filter/map again with a collect. See issue #2 about what I'm trying to express there, maybe that's not the best example.