scala-repl

    0熱度

    2回答

    我想在啓動scala repl時通過注入一些自定義值來定製scala repl。我可以使用什麼樣的API? scala 2.10和2.11有什麼區別?由於

    1熱度

    1回答

    考慮這種性狀「人」,這類「PersonImpl的」: trait Person { def name: String def surname: String def married: Boolean def married_=(state: Boolean): Unit override def toString(): String = nam

    1熱度

    1回答

    是否有可能創建(進入)在斯卡拉REPL嵌套的環境,使得退出嵌套的環境之後,退出環境中創建的所有變量綁定會丟失? 這是我希望會話可能看起來像: scala> val x = 1 x: Int = 1 scala> enter // How to implement this? // Entering nested context (type exit to exit) scala> va

    0熱度

    1回答

    我想定義的SBT的任務,將開始在classpath項目的編譯類和執行一些初始命令斯卡拉控制檯啓動斯卡拉REPL。 我想這是我的,我放在一起基於其他答案不好意思嘗試啓動這樣 sbt session 是REPL會話中,但 既不穿類路徑中的項目的類別,也沒有按」牛逼執行初始化命令: // extend Test in hope to include compiled sources on the c

    -2熱度

    2回答

    我的斯卡拉重現沒有顯示在屏幕上的日誌,因爲一些書籍和論壇似乎暗示。我在斯卡拉2.12.1。我的斯卡拉REPL當我嘗試下面的語法 scala> def sum(a:Int, b:Int) = a+ b sum: (a: Int, b: Int)Int 應顯示如下 scala> val fun2 = sum _ fun2: (Int, Int) => Int = <function2> 但

    0熱度

    1回答

    我想創建的Either實例中使用REPL例如asRight: import cats._ import cats.data._ import cats.implicits._ scala> val x = "xxx".asRight <console>:20: error: value asRight is not a member of String val x = "xx