spierce7
07/27/2018, 10:22 PMuli
07/27/2018, 11:30 PMfun <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.
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 :-(
`