Because of rarely using this functionality every time has to find out how to use multi type for context bound.
For example there is class extending Function1:
If we want to use Mapping[In, String] as a Context Bound for other class we should use type Lambda (type-level Lambda):
In case of return should be parametrised as well:
For example there is class extending Function1:
abstract class Mapping[In, Out] extends (In => Out)
If we want to use Mapping[In, String] as a Context Bound for other class we should use type Lambda (type-level Lambda):
abstract class StringRequestResponse[In: ({type M[x] = Mapping[x, String]})#M]
In case of return should be parametrised as well:
abstract class RequestResponse[In: ({type M[x] = Mapping[x, Out]})#M, Out]
No comments:
Post a Comment