4 ms·
I confirmed it for fun. Got 2.746 over 10000 trials. Close enough. (average (map-n (fn () (1+ (position-if (let1 x 0 (fni (< 1.0 (incf x (ra
by ced 14y ago
I confirmed it for fun. Got 2.746 over 10000 trials. Close enough.
(average (map-n (fn ()
(1+ (position-if (let1 x 0
(fni (< 1.0 (incf x (random 1.0)))))
(range 100))))
10000))