In python this works:
clear = lambda: os.system('cls')
clear()
How would I do that in scala?
For REPL there is :keybindings, Ctrl + L clears the screen.
Using REPL started from a bash shell:
scala> import scala.sys.process._
import scala.sys.process._
scala> def clear() = "clear".!
clear: ()Int
scala> clear()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With