(self: TMap.TMap<K, V>)
| 653 | )) |
| 654 | |
| 655 | const toReadonlyArray = <K, V>(self: TMap.TMap<K, V>): STM.STM<ReadonlyArray<readonly [K, V]>> => |
| 656 | core.effect<never, Array<readonly [K, V]>>((journal) => { |
| 657 | const buckets = tRef.unsafeGet(self.tBuckets, journal) |
| 658 | const capacity = buckets.chunk.length |
| 659 | const builder: Array<readonly [K, V]> = [] |
| 660 | let index = 0 |
| 661 | while (index < capacity) { |
| 662 | const bucket = buckets.chunk[index] |
| 663 | for (const entry of tRef.unsafeGet(bucket, journal)) { |
| 664 | builder.push(entry) |
| 665 | } |
| 666 | index = index + 1 |
| 667 | } |
| 668 | return builder |
| 669 | }) |
| 670 | |
| 671 | /** @internal */ |
| 672 | export const toChunk = <K, V>(self: TMap.TMap<K, V>): STM.STM<Chunk.Chunk<[K, V]>> => |
no test coverage detected
searching dependent graphs…