mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-05-16 22:13:46 +02:00
racket: correctly print exact non-integers
This commit is contained in:
parent
ac0c87564c
commit
e076be3c78
|
@ -2,5 +2,5 @@
|
|||
(cond
|
||||
[(void? x) #f]
|
||||
;; Also show fractions as decimals.
|
||||
[(and (rational? x) (not (integer? x))) (printf "~a = ~a" x (exact->inexact x))]
|
||||
[(and (exact? x) (not (exact-integer? x))) (printf "~a = ~a" x (exact->inexact x))]
|
||||
[else (pretty-print x)])))
|
||||
|
|
Loading…
Reference in a new issue