import { concreteTSet } from "@effect/core/stm/TSet/operations/_internal/InternalTSet" /** * Takes all matching values, or retries until there is at least one. * * @tsplus static effect/core/stm/TSet.Aspects takeSome * @tsplus pipeable effect/core/stm/TSet takeSome */ export function takeSome(pf: (a: A) => Maybe) { return (self: TSet): STM> => { concreteTSet(self) return self.tmap.takeSome((kv) => pf(kv[0])) } }