开发者

Why scala 2.8 REPL does not auto-complete some method (i.e. forall, exists)?

I started the scala REPL an write the following code:

scala> val a = Array(1,2,3,4)
a: Array[Int] = Array(1, 2, 3, 4)

scala> a.`<TAB>`

asInstanceOf   getClass       isInstanceOf   toString

scala> a.exists(_ == 1)
res1: Boolean = tru开发者_运维知识库e

Why I don't have "exists" listed when I press <TAB>?


I think it because Array do not have 'exists' method. 'exists' method is belong to ArrayOps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜