( entries: Iterable<readonly [K, V]> )
| 335 | * @since 2.0.0 |
| 336 | */ |
| 337 | export const fromIterable = <K, V>( |
| 338 | entries: Iterable<readonly [K, V]> |
| 339 | ): Effect.Effect<TxHashMap<K, V>> => |
| 340 | Effect.gen(function*() { |
| 341 | const hashMap = HashMap.fromIterable(entries) |
| 342 | const ref = yield* TxRef.make(hashMap) |
| 343 | return Object.assign(Object.create(TxHashMapProto), { ref }) |
| 344 | }) |
| 345 | |
| 346 | /** |
| 347 | * Looks up the value for the specified key in the TxHashMap. |