MCPcopy Index your code
hub / github.com/Effect-TS/effect / expand

Function expand

packages/effect/src/internal/hashMap/node.ts:327–343  ·  view source on GitHub ↗
(
  edit: number,
  frag: number,
  child: Node<K, V>,
  bitmap: number,
  subNodes: Array<Node<K, V>>
)

Source from the content-addressed store, hash-verified

325}
326
327function expand<K, V>(
328 edit: number,
329 frag: number,
330 child: Node<K, V>,
331 bitmap: number,
332 subNodes: Array<Node<K, V>>
333) {
334 const arr = []
335 let bit = bitmap
336 let count = 0
337 for (let i = 0; bit; ++i) {
338 if (bit & 1) arr[i] = subNodes[count++]!
339 bit >>>= 1
340 }
341 arr[frag] = child
342 return new ArrayNode(edit, count + 1, arr)
343}
344
345function mergeLeavesInner<K, V>(
346 edit: number,

Callers 1

modifyMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…