I am learning Scala, and I have seen some classes built using the template:
how
class Name[+S <: State](val name: String)
class User[S <: State] {
def state(implicit n: Name[S]): String = n.name
}
What does here <:and mean +S?
And does the sate function do?
thank
Alg_D source
share