braveandtrue

https://www.braveclojure.com/
2020-09-10T15:05:51.001400Z

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]`

2020-09-10T15:09:17.002200Z

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

2020-09-10T15:12:22.003Z

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

2020-09-10T15:13:24.003800Z

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]

2020-09-10T15:21:48.004200Z

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

👍 1