deno.land / x / rambda@v9.1.1 / source / forEachIndexed-spec.ts
1234567891011121314151617181920212223import {forEachIndexed} from 'rambda'
const list = [1, 2, 3]
describe('R.forEachIndexed', () => { it('happy', () => { const result = forEachIndexed((x, i) => { x // $ExpectType number i // $ExpectType number }, list)
result // $ExpectType number[] }) it('curried', () => { const result = forEachIndexed<number>((x, i) => { x // $ExpectType number i // $ExpectType number })(list)
result // $ExpectType number[] })})
Version Info