Skip to content
Lars Andersen expez@expez.com edited this page Jun 10, 2015 · 3 revisions

il Introduce let

Place the current form inside a new let form.

Given this:

(defn handle-request
  {:status 200
   :body (find-body abc)})

With the cursor in front of (find-body abc), I do cljr-introduce-let:

(defn handle-request
  {:status 200
   :body (let [X (find-body abc)]
           X)})

Now I have two cursors where the Xes are. Just type out the name, and press enter. Now, this is probably not where you wanted the let to be. Next step is el Expand let.