Closed awnofwheat closed 3 years ago
Thanks for your suggestion.
While I appreciate the idea of being able to occasionally swap elements of a Tuple2
, that functionality could (if at all) be implemented simply by a Tuple2<T1, T2>.swapAttributes(): Tuple2<T2, T1>
method. For the record, I don't think this utility pulls its weight, so I wouldn't want an alternative PR in this case.
We can't retain a swap
flag in the Tuple2
type. A Tuple2
doesn't care about the fact that its creator may have meant for the attributes to be swapped.
For the future, please discuss your ideas first before providing a PR.
I create a new constructer to create tuple2 so that we can choose whether to swap bounds by default.