deno.land / x / rambda@v9.1.1 / source / take-spec.ts
1234567891011121314151617181920212223242526272829303132import {take} from 'rambda'
const list = [1, 2, 3, 4]const str = 'foobar'const howMany = 2
describe('R.take - array', () => { it('happy', () => { const result = take(howMany, list)
result // $ExpectType number[] }) it('curried', () => { const result = take(howMany)(list)
result // $ExpectType number[] })})
describe('R.take - string', () => { it('happy', () => { const result = take(howMany, str)
result // $ExpectType string }) it('curried', () => { const result = take(howMany)(str)
result // $ExpectType string })})
Version Info