如何在Scala

时间:2016-05-19 15:21:44

标签: scala

我使用递归地图作为

val collect=mutable.Map[Char,Any]()
def next(pos: Int,map: mutable.Map[Char,Any]): Unit = {
                val ch=a(pos)
                val d=map.getOrElseUpdate(ch,mutable.Map[Char,Any]()).asInstanceOf[mutable.Map[Char,Any]]
                for (k <- perehods(pos)) {
                    next(k,d)
                }

            }
next(0,collect)

如何删除演员阵容?

1 个答案:

答案 0 :(得分:0)

您不能拥有递归类型别名,它必须是实际类型:

po [[NSUserDefaults standardUserDefaults] dictionaryRepresentation]