I\'m trying to get started with Scala and cannot get out of the starting gate.
A file consisting of the line
package x
gives me
Since Scala 2.11.0-M7 you can use :paste -raw (fix for issue SI-5299). This option allows defining packages in the REPL:
scala> :paste -raw
// Entering paste mode (ctrl-D to finish)
package Foo
class Bar
// Exiting paste mode, now interpreting.
scala> import Foo._
import Foo._
scala> new Bar
res1: Foo.Bar = Foo.Bar@3ee2cf81