babashka / book

Babashka book

Home Page:https://book.babashka.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chapter 6 -x examples need --prn

jdjohnston opened this issue · comments

Or, are -x expressions supposed to still be automatically printed?

With newer babashka, something like bb -x clojure.core/identity --hello there doesn't give an error, but neither is there output.
Adding the prn option, bb --prn -x clojure.core/identity --hello there works as expected.

We should probably change the examples to:

bb -x clojure.core/prn --hello there

PR welcome!

Interesting idea, but that wouldn't work for the tasks.clj example also in that section

The task could also just use (prn m) in the body

Not that you need my approval, but both edits you propose sound good to me :)

@jdjohnston Done! Thank you for bringing this to my attention.

@borkdude Oops, I just realized the text for the first -x example in Ch 6 still says the map is fed to the identity function.

(I saw you had recently updated the book & had to revisit my "favorite" :) chapter)

Should be fixed now