Type in expressions to have them evaluated.
Type :help for more information.
scala>
scala>
scala> res0: 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: anotherint
val bogus: anotherint = "hello"
^
scala> defined trait PointlessTrait
scala> x: Int = 2
y: Int = 3
scala> hello
scala>
scala>
scala> t1513: Array[Null] = Array(null)
scala>
scala> atom: scala.xml.Atom[Unit] = ()
scala>
scala> defined class S
scala> fish: S = fish
scala>
scala> arr: Array[java.lang.String] = Array(What's, up, doc?)
scala>
scala> arrInt: Any = Array(1, 2, 3)
scala>
scala> arrArrInt: Any = Array(Array(1, 2), Array(3, 4))
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>
scala>
scala>
scala> <console>:1: error: '=' expected but '=>' found.
def x => y => z
^
scala> <console>:1: error: expected start of definition
[1,2,3]
^
scala>
scala>
scala>
scala> | | | | res3: scala.xml.Elem =
<a>
<b d="dd" c="c"/></a>
scala>
scala>
scala> | | | |
scala>
scala>
scala>
scala> | | | res4: java.lang.String =
hello
there
scala>
scala> | | You typed two blank lines. Starting a new command.
scala>
scala> match: Int
scala> x: Int = 1
scala>
scala>
scala> defined class Exp
defined class Fact
defined class Term
scala> | | <console>:15: warning: match is not exhaustive!
missing combination Term
def f(e: Exp) = e match { // non-exhaustive warning here
^
f: (Exp)Int
scala>
scala>
plusOne: (Int)Int
res0: Int = 6
res0: java.lang.String = after reset
<console>:5: error: not found: value plusOne
plusOne(5) // should be undefined now
^