6 ms·
> and everyone will try to prove you wrong heh, how true, though more of an invitation; a strength/weakness of Scala is the fact that there's often more than
by virtualwhys 12y ago
> and everyone will try to prove you wrong
heh, how true, though more of an invitation; a strength/weakness of Scala is the fact that there's often more than one way to do the same thing (at least 3 ways have been shown with the current example). From what I've seen F# does not have this characteristic.
Anyway, ideally the Scala compiler would provide the same level of concision that for comprehensions do vis-a-vis flatMap/map boilerplate, thus reducing our example down to: `list map plus`, the bare essentials ;-)
Worth noting that the source for Function[0] indicates `Function.tupled` methods are slated for removal in future: "these functions are slotted for deprecation, but it is on hold pending superior type inference for tupling anonymous functions"
https://github.com/scala/scala/blob/v2.11.4/src/library/scala/Function.scala#L72 https://github.com/scala/scala/blob/v2.11.4/src/library/scal...