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.
(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).
(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).
(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.
(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
(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