繁体   English   中英

REPL中的scala api文档

[英]scala api document in REPL

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

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

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

在这一点上确实如此。

我写了一个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 "org.scala-lang" % "scala-library" % "2.11.2" -o ~/doc
[info] unzippped documents to /Users/foo/doc/scala-library-2.11.2-javadoc

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM