import * as tsplus_module_1 from "@effect/core/stm/TRandom/definition";
import * as tsplus_module_2 from "@tsplus/stdlib/utilities/RandomPCG";
import * as tsplus_module_3 from "@effect/core/stm/TRef/operations/make";
import * as tsplus_module_4 from "@effect/core/stm/STM/operations/map";
import * as tsplus_module_5 from "@effect/core/stm/STM/operations/provideServiceSTM";
import { LiveTRandom } from "@effect/core/stm/TRandom/operations/live";
/**
 * @tsplus static ets/TRandom/Ops withSeed
 */

export function withSeed(seed) {
  return stm => tsplus_module_5.provideServiceSTM_(stm, tsplus_module_1.TRandom.Tag, () => tsplus_module_4.map_(tsplus_module_3.make(() => new tsplus_module_2.RandomPCG(seed).getState()), _ => new LiveTRandom(_)));
}
//# sourceMappingURL=withSeed.mjs.map