raulraja
05/21/2018, 12:16 PMinterface Monoid<A>
extension class OptionMonoid<A>(with Monoid<A>) : Monoid<Option<A>>
fun doWithOptionMonoid(with Monoid<Option<A>>) = TODO()
The compiler would need to desugar this as:
fun doWithOptionMonoid($ev: Monoid<Option<A>> = new OptionMonoid(AMonoid)) = with ($ev) { TODO() }