blob: 4ed43dc851ba0c6290dcd0fb4e3ad4dbcae888f2 (
plain) (
tree)
|
|
This is an interpreter for Scala.
Type in expressions to have them evaluated.
Type :help for more information.
scala>
scala>
scala> unnamed0: Int = 7
scala> | | | | gcd: (int,int)int
scala> five: int = 5
scala> x: Int = 1
scala> x: Int = 2
scala> three: Int = 3
scala> defined type alias anotherint
scala> four: anotherint = 4
scala> <console>:5: error: type mismatch;
found : java.lang.String("hello")
required: $iw.$iw.anotherint
val bogus: anotherint = "hello"
^
scala> defined trait PointlessTrait
scala>
scala>
scala> defined class Foo
scala> defined class Bar
scala> foo2bar: (Foo)Bar
scala> bar: Bar = Bar(3)
scala>
scala>
scala> import bar._
scala> m: int = 3
scala>
scala>
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala>
scala>
scala> x1: Int = 1
scala> x2: Int = 1
scala> x3: Int = 1
scala> x4: Int = 1
scala> x5: Int = 1
scala> x6: Int = 1
scala> x7: Int = 1
scala> x8: Int = 1
scala> x9: Int = 1
scala> x10: Int = 1
scala> x11: Int = 1
scala> x12: Int = 1
scala> x13: Int = 1
scala> x14: Int = 1
scala> x15: Int = 1
scala> x16: Int = 1
scala> x17: Int = 1
scala> x18: Int = 1
scala> x19: Int = 1
scala> x20: Int = 1
scala>
scala> two: Int = 2
scala>
scala>
|