Fork me on GitHub
#braveandtrue
<
2020-09-10
Jeff Evans15:09:51

Hi, all. I wanted to report what appears to be a typo, primarily to help cement my own understanding. Tried reaching out to Daniel in a couple different ways with no response. In this chapter: https://braveclojure.com/writing-macros/ Specifically, the last `defmacro code-critic` has its arguments as `[{:keys [good bad]}]`, but I believe it should just be a plain vector: `[good bad]`

manutter5115:09:17

I would agree, based on the example. It’s a 2-arg macro, not a macro that takes a map and destructures it.

manutter5115:09:22

It also looks like the bad and good arguments are swapped, relative to the example he gives and the output he shows.

manutter5115:09:24

Or wait, in map destructuring, the order is undefined. But anyway for the given example to produce the given output, the arguments would have to be [bad good]

Jeff Evans15:09:48

Thanks for the second set of eyes, @manutter51! Appreciate it