Liking cljdoc? Tell your friends :D

benchy.random


chance?clj

(chance? random p)
source

next-instantclj

(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.
sourceraw docstring

next-intclj

(next-int random)
(next-int random bound)
source

next-local-timeclj

(next-local-time random)
source

next-longclj

(next-long random)
(next-long random bound)
source

next-stringclj

(next-string random n)
source

next-uuidclj

(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.
sourceraw docstring

shuffleclj

(shuffle random coll)

Shuffle a collection using the provided RNG (Fisher-Yates).

Shuffle a collection using the provided RNG (Fisher-Yates).
sourceraw docstring

uniform-nthclj

(uniform-nth random coll)
source

weighted-nthclj

(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.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close