Sha256: c7a58b6af529c4976e9212aa3f2dbd4e3367d89dd5551bf07de54a690438ebf0

Contents?: true

Size: 270 Bytes

Versions: 55

Compression:

Stored size: 270 Bytes

Contents

// tslint:disable-next-line: no-any
export default (list: any[], accumulator: any) => {
    const out = []
    let idx = -1
    const end = Array.isArray(list) ? list.length : 0

    while (++idx < end) {
        out.push(accumulator(list[idx]))
    }

    return out
}

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/typescript/exercises/accumulate/accumulate.example.ts
trackler-2.2.1.179 tracks/typescript/exercises/accumulate/accumulate.example.ts
trackler-2.2.1.178 tracks/typescript/exercises/accumulate/accumulate.example.ts
trackler-2.2.1.177 tracks/typescript/exercises/accumulate/accumulate.example.ts
trackler-2.2.1.176 tracks/typescript/exercises/accumulate/accumulate.example.ts
trackler-2.2.1.175 tracks/typescript/exercises/accumulate/accumulate.example.ts
trackler-2.2.1.174 tracks/typescript/exercises/accumulate/accumulate.example.ts
trackler-2.2.1.173 tracks/typescript/exercises/accumulate/accumulate.example.ts
trackler-2.2.1.172 tracks/typescript/exercises/accumulate/accumulate.example.ts
trackler-2.2.1.171 tracks/typescript/exercises/accumulate/accumulate.example.ts
trackler-2.2.1.170 tracks/typescript/exercises/accumulate/accumulate.example.ts
trackler-2.2.1.169 tracks/typescript/exercises/accumulate/accumulate.example.ts
trackler-2.2.1.167 tracks/typescript/exercises/accumulate/accumulate.example.ts
trackler-2.2.1.166 tracks/typescript/exercises/accumulate/accumulate.example.ts
trackler-2.2.1.165 tracks/typescript/exercises/accumulate/accumulate.example.ts
trackler-2.2.1.164 tracks/typescript/exercises/accumulate/accumulate.example.ts
trackler-2.2.1.163 tracks/typescript/exercises/accumulate/accumulate.example.ts
trackler-2.2.1.162 tracks/typescript/exercises/accumulate/accumulate.example.ts
trackler-2.2.1.161 tracks/typescript/exercises/accumulate/accumulate.example.ts
trackler-2.2.1.160 tracks/typescript/exercises/accumulate/accumulate.example.ts