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

Function randomWith

packages/effect/src/internal/defaultServices.ts:102–103  ·  view source on GitHub ↗
(f: (random: Random.Random) => Effect.Effect<A, E, R>)

Source from the content-addressed store, hash-verified

100
101/** @internal */
102export const randomWith = <A, E, R>(f: (random: Random.Random) => Effect.Effect<A, E, R>): Effect.Effect<A, E, R> =>
103 defaultServicesWith((services) => f(services.unsafeMap.get(random.randomTag.key)))
104
105/** @internal */
106export const withRandom = dual<

Callers 5

defaultServices.tsFile · 0.85
nextRangeFunction · 0.85
nextIntBetweenFunction · 0.85
shuffleFunction · 0.85
choiceFunction · 0.85

Calls 3

defaultServicesWithFunction · 0.85
getMethod · 0.65
fFunction · 0.50

Tested by

no test coverage detected