Type Parameter

About type parameters: [T <: Seq[String]]

<: means T must be a subclass of Seq[String];

In the code, T must be assigned to an object lower down the line;

So, in a word, the chain is one-way and can't be reversed;

<: <: <: <: <: <: <: <: <: <:

You can think of this as a value chain.

Once onset, it can't be reversed. It will forever be on one direction.

猜你喜欢

转载自blog.csdn.net/qq_25527791/article/details/89330393