Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pass Expression as arguments to Clojure REPL

I have been learning Clojure and lately I have been using the REPL as a comand line calculator, my 'workflow' would be greatly improved if it were possible to pass arguments to the Clojure REPL and get the output, does anyone know how to do that?

Clarification: For example I would like to execute lein "(+ 2 2)" and have it return 4

~  lein "(+ 2 2)"
'(+ 2 2)' is not a task. See 'lein help'.
like image 848
xanth Avatar asked Sep 16 '26 09:09

xanth


1 Answers

grenchman creates a repl, and each command line invocation gets a result from that repl, this is likely what you want.

like image 194
noisesmith Avatar answered Sep 19 '26 21:09

noisesmith



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!