
20 Jan
2016
20 Jan
'16
9:43 a.m.
On 16-01-18 04:17 PM, amindfv@gmail.com wrote:
I share Henning's concerns. Can someone provide a realistic example of where an instance for (,,) or (,,,) *is* desirable?
I'm looking at some examples in production code here at work:
firstOfThree (a, b, c) = a onFirstOfThree f = changeNode (\(a, b, c)-> (f a, b, c))
The triple that's being manipulated is local to a bigger function, and the order of its a, b, c parameters is arbitrary. If this code was written in presence of the proposed instances, the first parameter would likely become the last, and at least the latter function would be dropped:
onLastOfThree = fmap
I'm not convinced there's any downside, so I'm +1 on the proposal.