Join Slack
Powered by
Suggest adding `fun Pair<A, B>.flip(): Pair&...
# stdlib
b
Bob Glamm
10/23/2019, 4:47 PM
Suggest adding
fun Pair<A, B>.flip(): Pair<B, A> = Pair(second, first)
to the standard library
simple smile
2
🤔 3
m
miha-x64
10/23/2019, 5:14 PM
For which purpose? Why don't you write your own?
i
ilya.gorbunov
10/23/2019, 5:20 PM
Please describe your use case here:
https://youtrack.jetbrains.com/issue/KT-7116
b
Bob Glamm
10/23/2019, 6:24 PM
Added examples. There is also a well-founded category-theoretical basis for adding it which I am not conversant enough to describe yet.
g
gildor
10/24/2019, 2:47 AM
Honestly those samples looks not very convincing
2
Views
Open in Slack
Previous
Next