このコードはこのブログにあります: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]
私が見たことのない演算子があります。それを検索するのは難しいので(検索エンジンでは無視されます)、それが何を意味するのか誰が教えてくれますか?