MCPcopy Create free account
hub / github.com/Effect-TS/effect / hashIndexed

Function hashIndexed

packages/effect/src/Hash.ts:520–526  ·  view source on GitHub ↗
(arr: ArrayLike<unknown>)

Source from the content-addressed store, hash-verified

518}
519
520const hashIndexed = (arr: ArrayLike<unknown>): number => {
521 let h = 6151
522 for (let i = 0; i < arr.length; i++) {
523 h = combineDataFirst(h, hash(arr[i]))
524 }
525 return optimize(h)
526}
527
528const mapSeed = string("Map")
529const setSeed = string("Set")

Callers 1

hashFunction · 0.85

Calls 2

optimizeFunction · 0.85
hashFunction · 0.70

Tested by

no test coverage detected