I have some Scala functions defined in a file, not in a class, and I would like to use them in the Scala interpreter. I know I can say scala filename.scala
to simply run the file and exit the interpreter, but I would like to run the file and then stay in the interpreter so I can do some testing. Can anyone tell me how to simply load a file into the interpreter so I can use the functions defined within it?
type :load /path/to/file
in Scala REPL.
You can get complete list of available commands by typing :help