Fork me on GitHub

Does anyone know of code that takes an arg vector for a function, perhaps including destructuring expressions as can appear in source code, and checks it for validity / parses it? I know there is the code in Clojure itself, of course, but it turns it into let expression code. Looking to see if there is something that parses into some kind of data structure.


you can use the destructuring spec?


That's definitely one possible approach I will investigate. thx


Does anyone know of any examples of using a map at the end of a defn with multiple arities? I hadn't noticed that before. e.g. (defn foo ([x] (inc x)) {:a 1 😛 2}) This causes the map at the end to be conj'd onto the map of metadata that optionally appears after the doc string, and just before the definition of the first function arity.


Apparently it has been part of defn since 2009


huh, no that is the last time the lines of code doing that were edited, but it goes back farther. Weird that I have never noticed it.


That's a fun easter egg 🙂