(iterable: Iterable<readonly [K, V]>)
| 192 | |
| 193 | /** @internal */ |
| 194 | export const fromIterable = <K, V>(iterable: Iterable<readonly [K, V]>): STM.STM<TMap.TMap<K, V>> => |
| 195 | stm.suspend(() => { |
| 196 | const data = Chunk.fromIterable(iterable) |
| 197 | const capacity = data.length < InitialCapacity |
| 198 | ? InitialCapacity |
| 199 | : nextPowerOfTwo(data.length) |
| 200 | return allocate(capacity, data) |
| 201 | }) |
| 202 | |
| 203 | /** @internal */ |
| 204 | export const get = dual< |
no test coverage detected