• (lcg modulus multiplier increment seed)
Create a linear congruential generator

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/probabilities/random_numbers.clj:35 top

(deftype ::lcg lcg
  "Create a linear congruential generator"
  {:arglists '([modulus multiplier increment seed])}
  (fn [modulus multiplier increment seed]
    {:m modulus :a multiplier :c increment :seed seed})
  (fn [s] (map s (list :m :a :c :seed))))
Vars in clojure.contrib.probabilities.random-numbers/lcg: deftype fn list map
Used in 0 other vars

Comments top

No comments for lcg. Log in to add a comment.