johnmn3/injest

Suggestion: test macroexpansions

Opened this issue · 0 comments

vemv commented

Hi!

I checked out again this library, it has been a while since last time.

injest.classical/x>> would be the macro that would interest me the most, to begin with.

However I found its docstring and mention in the readme a bit terse.

What I would find most reassuring in terms of both learning and trusting the provided macros, would be a set of deftests that macroexpanded them.

For instance, say that my name was Rich, this is how I might test clojure.core/->>:

(is (= '(dec (inc (dec (inc x))))
       (macroexpand-1 '(->> x inc dec inc dec))))

It's something that has served me well while authoring heavy macros.

Hope you find the suggestion useful.

Thanks - V