🥷 Clojure Pro Tip 3: the Thread-As Macro


Published: 2025-04-23, Last Updated: 2025-05-17

So you're more than excited to find out how Clojure's thread macros can make code clean and concise, you just love it! But at some point you'll be trapped a bit as the threaded argument's positions are inconsistent using -> or ->>.

Luckily, you can use as-> to place the argument wherever you like:

Lambda vs. thread-as
Lambda vs. thread-as

See also

comments powered by Disqus