and you see, that
:load <path> load and interpret a Scala file
solves your problem.
In some circumstances, pasting the code might be preferable though, but then
might be your friend then. It helps inserting a whole block without feedback, line by line, until you hit Ctrl + D. In some cases this is significant for the code interpretation.
- How to run an external file from within the scala interactive interpreter (REPL)?
- How do I get the Scala version from within Scala itself?
- Scala - How to compile code from an external file at runtime?
- Scala interactive interpreter (REPL) - how to redirect the output to a text file?
- How do I run Scala + specs2 from the command line?
- How can I find the statements in a Scala program from within a compiler plugin?
- How to run scala file from command line?
- How to use JDBC from within the Spark/Scala interpreter (REPL)?
- how to run scala jar file within java file?
- How the Scala script that reads 5G log file from network drive should be modified in order to read last x lines (like 'tail' in Unix)?
- Functional Programming in Scala book: How to run the inline examples from chapter 9?
- How to run a Scala class that's in a package from the command line
- How to make IntelliJ Scala plugin run the unit test, or how to teach IntelliJ that a file is a unit test code?
- How can I require a scala file from another directory to run a unit test?
- How to get the class of a trait within an object defined in scala from within a java class?
- how to compile and run one single scala file without building whole project within intellij
- How to produce list of words from the text file in scala
- Scala Lift - Run PHP file from within scala runtime
- How to run gsutil from Scala without the .cmd suffix?
- how to change the config file for correct java location to run scala ide - 'returned exit code 1'
- Eclipse Scala IDE 4.1.1 - How to run the load project in the interpreter using a keyboard shortcut?
- How to detect the heap size from within a Scala program?
- How to filter the data from Rdd and save it to text file using scala in spark
- scala spark sql with intellij, how to link jdbc jar file and run the scala code
- How can I get the name of an Akka actor from within the actor itself?
- Spark : how to run spark file from spark shell
- How does the “scala.sys.process” from Scala 2.9 work?
- How are Scala collections able to return the correct collection type from a map operation?
- How to read a file from classpath without external dependencies?
More Query from same tag
- is there a way to mock Instant.now
- Using SprayJson when json fields are optional
- How to fetch time from ObjectId in mongodb database..?
- How to define function in Scala that returns a function that itself returns a function
- How do I simplify this transitive application in Scala
- Scala while(true) type mismatch? Infinite loop in scala?
- Scala: How can I replace value in Dataframes using scala
- SPARK: java.lang.IllegalStateException: Cannot find any build directories
- Akka HTTP custom headers: error in documentation or unfamiliar syntax?
- Why can't a polymorphic function accept wildcard (existential) types in Scala?
- Dynamic keys in hocon
- How to split string on brackets ")("?
- Implement the flatMap function
- How to get the mouse "x" and "y" when I click in scala
- Bracket Access in Scala.js
- Slick 3.0: Idiomatic way to GET results from the database inside of Option (Scala Play Framework)
- Generic state management
- How to test how method handles concurrent calls
- How to encode categorical features in Apache Spark
- Scala sbt unable to find commons-logging-1.0.4.jar
- How to print a Monocle Lens as a property accessor style string
- Scala's blend of functional with object-oriented
- How to do joins in slick?
- How to use withColumn Spark Dataframe scala with while
- Companion objects benefits of posibility to implement interfaces
- Can I use 'nesting' with Scala abstract types to simplify class definitions?
- Abstraction for asynchronous computation that cannot fail
- perform join on multiple DataFrame in spark
- Hadoop Port: fs.default.name
- Dependency Injection to Play Framework 2.5 modules