Suggest adding `fun Pair<A, B>.flip(): Pair&...
# stdlib
b
Suggest adding
fun Pair<A, B>.flip(): Pair<B, A> = Pair(second, first)
to the standard library
simple smile 2
🤔 3
m
For which purpose? Why don't you write your own?
i
Please describe your use case here: https://youtrack.jetbrains.com/issue/KT-7116
b
Added examples. There is also a well-founded category-theoretical basis for adding it which I am not conversant enough to describe yet.
g
Honestly those samples looks not very convincing