import * as Benchmark from 'benchmark' ; import * as R from 'ramda' ; import * as FR from '../src/' ; const suite = new Benchmark . Suite ( ) ; const odd = ( n ) => n % 2 !== 0 ; const lt20 = ( n ) => n < 20 ; const gt5 = ( n ) => n > 5 ; suite . add ( 'anyPass (ramda)' , function ( ) { R . anyPass ( [ odd , lt20 , gt5 ] ) ( 20 ) ; } ) . add ( 'anyPass (fp-ts)' , function ( ) { FR . anyPass ( [ odd , lt20 , gt5 ] ) ( 20 ) ; } ) . on ( 'cycle' , function ( event ) { console . log ( String ( event . target ) ) ; } ) . on ( 'complete' , function ( this ) { console . log ( 'Fastest is ' + this . filter ( 'fastest' ) . map ( 'name' ) ) ; } ) . run ( { async : true } ) ;