Function
seekLoop
(self: TQueue.TDequeue<A>, predicate: Predicate<A>)
Source from the content-addressed store, hash-verified
| 304 | >(2, (self, predicate) => seekLoop(self, predicate)) |
| 305 | |
| 306 | const seekLoop = <A>(self: TQueue.TDequeue<A>, predicate: Predicate<A>): STM.STM<A> => |
| 307 | core.flatMap( |
| 308 | self.take, |
| 309 | (a) => predicate(a) ? core.succeed(a) : seekLoop(self, predicate) |
| 310 | ) |
| 311 | |
| 312 | /** @internal */ |
| 313 | export const shutdown = <A>(self: TQueue.TDequeue<A> | TQueue.TEnqueue<A>): STM.STM<void> => self.shutdown |
Tested by
no test coverage detected