diff --git a/src/math/rand/example_test.go b/src/math/rand/example_test.go index aa1f2bcc734..adeeaa0b469 100644 --- a/src/math/rand/example_test.go +++ b/src/math/rand/example_test.go @@ -16,7 +16,10 @@ import ( // the output of the random number generator when given a fixed seed. func Example() { - rand.Seed(42) // Try changing this number! + // Seeding with the same value results in the same random sequence each run. + // For different numbers, seed with a different value, such as + // time.Now().UnixNano(), which yields a constantly-changing number. + rand.Seed(42) answers := []string{ "It is certain", "It is decidedly so",