Fork me on GitHub
#clojure-spec
<
2020-02-12
>
telekid23:02:55

Instrumentation / generation question. In the following gist, an outer function calls an inner function twice with the same value (`i`). I want to write an fdef for the outer function, using a :fn predicate to assert that the return from the two calls to the inner fn are identical. However, when I try to stub the call to inner with instrumentation, the generated values returned by inner’s stub are (sensibly) different. Is there any way to express on the fdef of inner that the generated values should be some known function of the input? gist here: https://gist.github.com/telekid/01b0aed73511167c337794bc286908cf