MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / zip

Function zip

static/utils.ts:163–167  ·  view source on GitHub ↗
(a: T[], b: T[])

Source from the content-addressed store, hash-verified

161
162// zip two arrays up until min(a.length, b.length)
163export function* zip<T>(a: T[], b: T[]) {
164 for (let i = 0; i < Math.min(a.length, b.length); i++) {
165 yield [a[i], b[i]] as [T, T];
166 }
167}

Callers 4

read_tableFunction · 0.85
calculateTreePackingFunction · 0.85
combineRowBoundsFunction · 0.85

Calls

no outgoing calls

Tested by 1