itertools-ts icon indicating copy to clipboard operation
itertools-ts copied to clipboard

Implement random.coinFlip()

Open Smoren opened this issue 11 months ago • 2 comments

Generate random coin flips (0 or 1).

If optional param repetitions not given then iterate infinitely.

function *coinFlip(repetitions?: number): Iterable<number>

PHP implementation example

Needs to be implemented:

  • random.coinFlip()
  • random.coinFlipAsync()
  • Stream.coinFlip()
  • AsyncStream.coinFlip()

Smoren avatar Feb 09 '25 12:02 Smoren

Hi! I'd like to work on this issue. Let me know if that's okay

irtaza-shahzad avatar Jul 23 '25 21:07 irtaza-shahzad

Hi @irtaza-shahzad! Thank you! Let's go :)

Smoren avatar Jul 24 '25 10:07 Smoren