Liking cljdoc? Tell your friends :D

com.michaelgaare.clj-util.random

Seeded random functions, mirroring those from clojure core. Each take a seed, a java.util.Random rng, as first arg. This will be mutated.

Seeded random functions, mirroring those from clojure core. Each take a
seed, a java.util.Random rng, as first arg. This will be mutated.
raw docstring

randclj

(rand seed)
(rand seed n)

Like clojure.core/rand but taking a seed, returns a random floating point number between 0 (inclusive) and n (default 1) (exclusive).

Like clojure.core/rand but taking a seed, returns a random floating
point number between 0 (inclusive) and n (default 1) (exclusive).
raw docstring

rand-intclj

(rand-int seed n)

Like clojure.core/rand-int but taking a seed, returns a random integer between 0 (inclusive) and n (exclusive).

Like clojure.core/rand-int but taking a seed, returns a random
integer between 0 (inclusive) and n (exclusive).
raw docstring

rand-nthclj

(rand-nth seed coll)

Like clojure.core/rand-nth but taking a seed, return a random element of the (sequential) collection. Will have the same performance characteristics as nth for the given collection.

Like clojure.core/rand-nth but taking a seed, return a random
element of the (sequential) collection. Will have the same
performance characteristics as nth for the given collection.
raw docstring

random-seedclj

(random-seed)

Creates a new random seed

Creates a new random seed
raw docstring

shuffleclj

(shuffle seed coll)

Like clojure.core/shuffle but taking a seed, return a random permutation of coll

Like clojure.core/shuffle but taking a seed, return a random
permutation of coll
raw docstring

ToSeedcljprotocol

make-seedclj

(make-seed x)

Creates a seeded random generator from given seed value

Creates a seeded random generator from given seed value

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close