Is it possible in a Clojure REPL to stop the execution of a function without terminating the REPL session? How can I do this?
I'm using lein repl
in bash, if it matters. I'm using Leiningen 1.7.1
There is no way to stop execution. On those versions CTRL-C will lead to termination of the whole scala REPL. The change was introduced with Scala 2.9.
You can exit the REPL by typing Ctrl+D (pressing the Ctrl and D keys at the same time).
What is a REPL? A Clojure REPL (standing for Read-Eval-Print Loop) is a programming environment which enables the programmer to interact with a running Clojure program and modify it, by evaluating one code expression at a time.
Have you tried just Ctrl-C
? It should work in your case.
Update. I've downgraded to Leiningen version 1.7.1. And it really quits repl by Ctrl-C. You should upgrade lein as Bozhidar Batsov said.
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