Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to load your own file into a lein repl?

I am reading a Clojure book. I typed one of the examples into a file. How can I load it into a lein repl?

I don't have a lein project and would prefer not to create one.

like image 393
beluchin Avatar asked Aug 20 '15 11:08

beluchin


People also ask

How does Clojure REPL work?

So a ClojureScript REPL consists of two parts: the first part is written in Clojure, it handles the REPL UI, and takes care of compiling ClojureScript to JavaScript. This JavaScript code then gets handed over to the second part, the JavaScript environment, which evaluates the code and hands back the result.


1 Answers

lein repl (this will not create a lein project)

then in repl

user=> (load-file "yourfile.clj")

like image 135
birdspider Avatar answered Oct 20 '22 18:10

birdspider