https://kotlinlang.org logo
#coroutines
Title
# coroutines
s

spierce7

07/27/2018, 10:22 PM
In case anyone missed the planned cold-streams work explanation: https://github.com/Kotlin/kotlinx.coroutines/issues/254#issuecomment-408379789
👍 2
u

uli

07/27/2018, 11:30 PM
Well, I guess it might work for filter:
Copy code
fun <Src, SrcElement> Src.filter(): Src
        where Src : Source<SrcElement>,
But not for map. The type system has no way (that i know of) to say two types must be equal except for their type parameter.
Copy code
fun <Dst, Src, SrcElement, DstElement> Src.map(): Dst
        where Src : Source<SrcElement>,
              Dst : Source<DstElement> // <-- We can not express that Src and Dst must be the same generic type, except for their type parameter :-(
`