(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))))
Comments top
No comments for lcg. Log in to add a comment.