Here’s the translation of the random numbers example from Go to D, formatted in Markdown suitable for Hugo:
D’s std.random module provides pseudorandom number generation.
The uniform function is used to generate random integers within a specified range. For example, uniform(0, 100) returns a random int n, where 0 <= n < 100.
uniform01() returns a double f, where 0.0 <= f < 1.0.
This can be used to generate random floats in other ranges, for example 5.0 <= f' < 10.0, by using uniform(5.0, 10.0).
If you want a known seed, create a new Random object with a specific seed. This allows for reproducible sequences of random numbers.
Some of the generated numbers may be different when you run the sample.
See the std.random module documentation for references on other random quantities that D can provide.