chickadee » srfi-194 » make-bernoulli-generator

make-bernoulli-generator pprocedure

Returns a generator that yields 1 with probability p and 0 with probability 1 - p.

Chicken note: This is implemented in terms of make-random-bernoullis from srfi-27, except that make-random-bernoullis returns booleans, not integers.