(next-instant random)(next-instant random start-year end-year)Return a random instant between the beginning of start-year (inclusive)
and the beginning of (inc end-year) (exclusive).
Defaults to the current calendar year and the preceding ten years.
Return a random instant between the beginning of `start-year` (inclusive) and the beginning of `(inc end-year)` (exclusive). Defaults to the current calendar year and the preceding ten years.
(next-uuid random)Generate a version-4 UUID using the supplied RNG, matching java.util.UUID/randomUUID idioms.
Generate a version-4 UUID using the supplied RNG, matching java.util.UUID/randomUUID idioms.
(shuffle random coll)Shuffle a collection using the provided RNG (Fisher-Yates).
Shuffle a collection using the provided RNG (Fisher-Yates).
(weighted-nth rng weights xs)Draw a single element from xs with non-negative weights. Returns nil if xs empty. If all weights are zero, falls back to uniform.
Draw a single element from xs with non-negative weights. Returns nil if xs empty. If all weights are zero, falls back to uniform.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |