Skip to main content
Module

x/rambda/compose-spec.ts

Faster and smaller alternative to Ramda
Go to Latest
File
import {add, subtract, compose, map, filter} from 'rambda'
describe('R.compose', () => { it('happy', () => { const result = compose(subtract(11), add(1), add(1))(1) result // $ExpectType number })
it('with R.filter', () => { const result = compose( filter<number>(x => x > 2), map(add(1)) )([1, 2, 3]) result // $ExpectType readonly number[] })
it('with void', () => { const result = compose( () => {}, () => {} )() result // $ExpectType void })})