(readonly state: TRef.TRef<Random.PCGRandomState>)
| 88 | class TRandomImpl implements TRandom.TRandom { |
| 89 | readonly [TRandomTypeId]: TRandom.TRandomTypeId = TRandomTypeId |
| 90 | constructor(readonly state: TRef.TRef<Random.PCGRandomState>) { |
| 91 | this.next = withState(this.state, randomNumber) |
| 92 | this.nextBoolean = core.flatMap(this.next, (n) => core.succeed(n > 0.5)) |
| 93 | this.nextInt = withState(this.state, randomInteger) |
| 94 | } |
| 95 | |
| 96 | next: STM.STM<number> |
| 97 | nextBoolean: STM.STM<boolean> |
nothing calls this directly
no test coverage detected