Clojure : loading dependencies at the REPL

I’ll go from high-level down to your particular problem: How Clojure (or LISPs) Generally Work REPLs, or Read-Eval-Print Loops are the core of how LISPs are designed: The reader converts a stream of characters into data structures (called Reader Forms). The evaluator takes collection of reader forms and evaluates them. The printer emits the results … Read more

Clojure – difference between ‘ (apostrophe) and ` (backtick)

When you quote a collection with ‘, the symbol-name will be quoted exactly as you enter it. ‘(+ x x) => (+ x x) (map namespace *1) => (nil nil nil) ‘(bingo/+ lara/y user/z) => (bingo/+ lara/y user/z) (map namespace *1) => (“bingo” “lara” “user”) When you quote a collection with the backtick, it tries … Read more

Can I clean the repl?

If you want to clear the current namespace of all temporary variables and functions you declared you can use this one liner (or make a function of it) : (map #(ns-unmap *ns* %) (keys (ns-interns *ns*))) or (ns myutil) (defn ns-clean “Remove all internal mappings from a given name space or the current one if … Read more

tech