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

uw Unwind thread

To start out enter:

(map square (filter even? [1 2 3 4 5]))

Put your cursor in front of the s-exp, and call cljr-thread-last-all:

(->> [1 2 3 4 5]
     (filter even?)
     (map square))

If we think we went to far we can place the cursor somewhere inside the thread form and hit cljr-unwind-thread and we'll get:

(->> (filter even? [1 2 3 4 5])
     (map square))

There's also clj-unwind-all if we wanted to undo all the threading, instead of just one level.