REPL中的scala api文档

我是 Scala编程的新手,并且喜欢在eclipse之外的终端编码,因为它非常好.我找不到任何信息的一件事是如何检索Scala REPL上的api文件(即“scala”或“sbt”命令),如python或ipython响应在help()或放“?”分别在api的末尾.甚至Scala似乎也没有像 Python的“pydoc”或C语言的“man”那样的命令.

只有找到api文档的方法是通过浏览web表单的文件或者我错过了吗?

解决方法

Is it true that only way to find api document is by browsing document with web form or am I missing?

在这一点上确实如此.

我写了一个sbt插件sbt-man,但它的能力是有限的.

> man Traversable /:
[man] scala.collection.Traversable
[man] def /:[B](z: B)(op: (B ⇒ A ⇒ B)): B
[man] Applies a binary operator to a start value and all elements of this
collection,going left to right. Note: /: is alternate syntax for foldLeft;
z /: xs is the same as xs foldLeft z. Note: will not terminate for infinite-
sized collections. Note: might return different results for different runs,unless the underlying collection type is ordered. or the operator is
associative and commutative.

为了便于下载,我还写了doctrine.

$doctrine "org.scala-lang" % "scala-library" % "2.11.2" -o ~/doc
[info] unzippped documents to /Users/foo/doc/scala-library-2.11.2-javadoc

相关文章

共收录Twitter的14款开源软件,第1页Twitter的Emoji表情 Tw...
Java和Scala中关于==的区别Java:==比较两个变量本身的值,即...
本篇内容主要讲解“Scala怎么使用”,感兴趣的朋友不妨来看看...
这篇文章主要介绍“Scala是一种什么语言”,在日常操作中,相...
这篇文章主要介绍“Scala Trait怎么使用”,在日常操作中,相...
这篇文章主要介绍“Scala类型检查与模式匹配怎么使用”,在日...