brave-clojure-web icon indicating copy to clipboard operation
brave-clojure-web copied to clipboard

Fix 'macroexpand' output in Chapter 8

Open pyrmont opened this issue 6 years ago • 0 comments

The output of calling macroexpand for the if-valid macro is shown at the end of Chapter 8. However, the output is presented as code to be input by the user rather than code that will be output (by listing it as a comment). This fixes that.

It is noted for completeness that in Clojure 1.10.0, the code as written will fail to compile. This is because the spec for macroexpand no longer allows simple symbols (such as, in this case, my-error-name). These need to be appended with a #. However, since the current edition is written for Clojure 1.9.0, fixing this would represent a more comprehensive change that is beyond the scope of this PR.

pyrmont avatar Jan 28 '19 10:01 pyrmont