chickadee » clojurian » as->

(as-> val name forms ...)syntax

Evaluates forms in order in a scope where name is bound to val for the first form, the result of that for the second form, the result of that for the third form, and so forth. Returns the result of the last form.

Examples:

(as-> 3 x (+ x 7) (/ x 2)) => 5

It's mainly useful in combination with ->:

(-> 10 (+ 3) (+ 7) (as-> x (/ 200 x))) => 10