https://kotlinlang.org logo
#arrow-contributors
Title
# arrow-contributors
r

raulraja

10/11/2018, 3:11 PM
@Richard Gibson not sure you can encode contravariance in instance methods. We also use extensions in Arrow to provide those kinds of methods because we have not been able to encode them as instance methods. For example:
Copy code
fun <T> Option<T>.getOrElse(default: () -> T): T = ...
which in Scala is an instance method that looks like:
Copy code
def getOrElse[B >: A](default: => B): B = ...