How do I convert a value of the form 20.2
into something that (random ...)
accepts?
I've tried these:
;; x defined by some earlier maths and of form 20.2
(random (round x))
(random (floor x))
But both return:
random: contract violation
expected: (or/c (integer-in 1 4294967087) pseudo-random-generator?)
given: 20.0
exact-round
andexact-floor
functions from racket/math do that. – Memo