Clojure provides random number generation through its clojure.core/rand and clojure.core/rand-int functions. For more advanced functionality, we can use the java.util.Random class from Java.
To run the program, you can save it as random_numbers.clj and use the Clojure command-line tool:
Some of the generated numbers may be different when you run the sample.
In this Clojure version:
We use rand-int for generating random integers and rand for random doubles.
To create a seeded random number generator, we use Java’s Random class.
The PCG (Permuted Congruential Generator) is not directly available in Clojure, so we use Java’s Random class as an alternative.
The syntax and function names are adapted to Clojure conventions.
See the Clojure documentation for references on other random quantities that Clojure can provide.