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

Function array

packages/effect/src/Hash.ts:512–518  ·  view source on GitHub ↗
(arr: Iterable<A>)

Source from the content-addressed store, hash-verified

510 * @since 2.0.0
511 */
512export const array = <A>(arr: Iterable<A>): number => {
513 let h = 6151
514 for (const element of arr) {
515 h = combineDataFirst(h, hash(element))
516 }
517 return optimize(h)
518}
519
520const hashIndexed = (arr: ArrayLike<unknown>): number => {
521 let h = 6151

Callers

nothing calls this directly

Calls 2

optimizeFunction · 0.85
hashFunction · 0.70

Tested by

no test coverage detected