Refactor random number generation to factory
- Use a `make-random` factory to create isolated random number generators. - Remove the global `prng` from the `Environment`. - Ensure `make-random` can be called with or without a seed.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
;; Benchmark: 2.0us
|
||||
;; Benchmark-Repeat: 1015
|
||||
;; Benchmark: 3.0us
|
||||
;; Benchmark-Repeat: 593
|
||||
;; Output: PipelineNode[last: Some(110.45243843391206)]
|
||||
|
||||
(do
|
||||
;; Set the random seed to match the existing test output exactly
|
||||
(seed! 42)
|
||||
(def random (make-random 42))
|
||||
|
||||
;; Use our new generic create-ticker to pulse 3 times
|
||||
(def cnt 3)
|
||||
|
||||
Reference in New Issue
Block a user