blob: bda463d6a6361867005de4f9f7506c8bb1c3cc61 (
plain) (
blame)
1
2
3
4
5
6
7
8
|
object Test {
def idMap[C[_],T](m: { def map[U](f: T => U): C[U] }): C[T] = m.map(t => t)
def main(args: Array[String]): Unit = {
idMap(Some(5))
idMap(Responder.constant(5))
}
}
|