braveclojure / cftbat-code

392 stars 100 forks source link

Unquote splicing example issue #10

Open kxygk opened 6 years ago

kxygk commented 6 years ago

In Chapter 8, when explaining unquote splicing you change the macro arguments from 2 arguments to using a map and keywords. The example that follows is then incorrect (and doesn't run in my REPL) https://github.com/braveclojure/cftbat-code/blob/master/08/code.clj#L231

This line should read instead (code-critic {:good (1 + 1) :bad (+ 1 1)})

As far as I understand the argument change is unrelated to the unquote splicing and just makes things more confusing. Please correct me if I'm wrong :)

Thanks for the great book. I'm enjoying it a lot

randallard commented 3 years ago

I've been suggesting this book to a bunch of people... it's pretty great that I got this far before running into a code error... maybe this example could be fixed in the online version?