simon.vergauwen
04/18/2019, 9:16 AMfun <F> Kind<F, Int>.addOne(FF: Functor<F>): Kind<F, Int> = with(FF) {
map { i -> i + 1 }
}
With KEEP-87 https://kotlinlang.slack.com/archives/C0B9K7EP2/p1555493024015100 this would become fun <F> Kind<F, Int>.addOne(with FF: Functor<F>): Kind<F, Int> = map { i -> i + 1 }
since then the compiler can prove if an impl of Functor
exists for F
.