ฉันเห็นรหัสนี้ในบล็อกนี้: Type-Level Programming ใน Scala :
// define the abstract types and bounds
trait Recurse {
type Next <: Recurse
// this is the recursive function definition
type X[R <: Recurse] <: Int
}
// implementation
trait RecurseA extends Recurse {
type Next = RecurseA
// this is the implementation
type X[R <: Recurse] = R#X[R#Next]
}
object Recurse {
// infinite loop
type C = RecurseA#X[RecurseA]
}
มีตัวดำเนินการ#
ในรหัสR#X[R#Next]
ที่ฉันไม่เคยเห็น เนื่องจากมันยากที่จะค้นหา (ไม่สนใจโดยเครื่องมือค้นหา) ใครสามารถบอกฉันได้ว่ามันหมายถึงอะไร?