The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Ted S. (9) [Avatar] Offline
#1
I get the following error when I try the infix calculator in a REPL:
IllegalArgumentException No matching clause: ÷  user/operator

The code example works when I modify the operator function as follows:
(defn operator [op]
  (case op
    ("+" "plus") +
;   ("-" "minus")
    ("-" "minus") -
    ("*" "x" "·" "times") *
    ("/" "÷") /
    error))


p.s. Renzo, thanks for all your hard work writing this book. Creating a comprehensive reference of the standard library is a great idea and I look forward to continuing to read it cover to cover.
reborg (16) [Avatar] Offline
#2
Good catch Ted! I've fixed it and also rewrote a few sentences around in the chapter that on a second look after some time don't seem be very readable.

Thanks
Renzo
Ted S. (9) [Avatar] Offline
#3
Hi Renzo,

It looks like the fix didn't make it into V20; perhaps it's slated for V21.