在斯卡拉REPL一個可以找到值類型:Scala REPL:如何查找函數類型?
scala> val x = 1
x: Int = 1
scala> :t x
Int
然而斯卡拉REPL不顯示的功能類型的信息:
scala> def inc(x:Int) = x + 1
inc: (x: Int)Int
scala> :t inc
<console>:9: error: missing arguments for method inc;
follow this method with `_' if you want to treat it as a partially applied function
inc
^
<console>:9: error: missing arguments for method inc;
follow this method with `_' if you want to treat it as a partially applied function
inc
^
如何查找函數類型斯卡拉REPL?
如何做它說什麼錯誤消息? – folone 2013-03-25 09:48:35
[this]的可能重複(http://stackoverflow.com/questions/15583551/type-in-in-the-scala-repl) – 2013-03-25 10:02:38