( state: TRef.TRef<Random.PCGRandomState>, f: (state: Random.PCGRandomState) => [A, Random.PCGRandomState] )
| 39 | } |
| 40 | |
| 41 | const withState = <A>( |
| 42 | state: TRef.TRef<Random.PCGRandomState>, |
| 43 | f: (state: Random.PCGRandomState) => [A, Random.PCGRandomState] |
| 44 | ): STM.STM<A> => { |
| 45 | return pipe(state, tRef.modify(f)) |
| 46 | } |
| 47 | |
| 48 | const shuffleWith = <A>( |
| 49 | iterable: Iterable<A>, |
no test coverage detected