fix: racket REPL no longer errors when trying to print something not a number.

This commit is contained in:
LordMZTE 2023-11-12 18:15:48 +01:00
parent b9a07f3329
commit d8cadc62dc
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6

View file

@ -2,5 +2,5 @@
(cond
[(void? x) #f]
;; Also show fractions as decimals.
[(and (exact? x) (not (exact-integer? x))) (printf "~a = ~a" x (exact->inexact x))]
[(and (number? x) (exact? x) (not (exact-integer? x))) (printf "~a = ~a" x (exact->inexact x))]
[else (pretty-print x)])))