Fork me on GitHub
#clojure-dev
<
2017-09-28
>
chalcidfly18:09:06

I was told to bring a question here that may have a solution in clojure.tools.analyzer

chalcidfly18:09:15

Let’s say I take a function, like (defn whatever [x] (+ x x)), and a specific usage of this function, say (whatever 10), is there a way I can return the original function definition but with the args replaced? So in this case, (defn whatever [10] (+ 10 10))?

chalcidfly18:09:41

I’m thinking it will involve some kind of static analysis but I’m unclear where to start, or if there’s already some library that does this