Tag Info

New answers tagged


Scala doesn't have delegates, but you are free to assign functions/lambdas to variables. Here, normal subtyping rules apply. A function f: A => B is a subtype of g: C => D if the argument is a supertype A > C (contravariance) and the return type is a subtype B < D (contravariance). Note that any of those four types might actually be tuples, so ...

Top 50 recent answers are included