MCPcopy Index your code
hub / github.com/Effect-TS/effect / shuffle

Method shuffle

packages/effect/src/internal/stm/tRandom.ts:106–108  ·  view source on GitHub ↗
(elements: Iterable<A>)

Source from the content-addressed store, hash-verified

104 return withState(this.state, randomIntegerBetween(low, high))
105 }
106 shuffle<A>(elements: Iterable<A>): STM.STM<Array<A>> {
107 return shuffleWith(elements, (n) => this.nextIntBetween(0, n))
108 }
109}
110
111/** @internal */

Callers

nothing calls this directly

Calls 2

nextIntBetweenMethod · 0.95
shuffleWithFunction · 0.70

Tested by

no test coverage detected