import { compose } from '../..' ; const numberToNumber = ( a ) : number => a + 2 ; const numberToString = ( a ) : string => 'foo' ; const stringToNumber = ( a ) : number => 5 ; const t1 = compose ( numberToNumber , numberToNumber ) ( 5 ) ; const t2 = compose ( numberToString , numberToNumber ) ( 5 ) ; const t3 = compose ( numberToString , stringToNumber ) ( 'f' ) ; const t4 = compose ( ( f ) => ( p ) => 5 , ( f ) => ( p ) => 4 ) ( numberToString ) ; const t5 = compose ( stringToNumber , numberToString , numberToNumber ) ( 5 ) ; const t6 = compose ( numberToString , stringToNumber , numberToString , numberToNumber ) ( 5 ) ; const t7 = compose < string > ( numberToString , numberToNumber , stringToNumber , numberToString , stringToNumber ) ( 'fo' ) ; const multiArgFn = ( a , b , c ) : string => 'foo' ; const t8 = compose ( multiArgFn ) ( 'bar' , 42 , true ) ; const t9 = compose ( stringToNumber , multiArgFn ) ( 'bar' , 42 , true ) ; const t10 = compose ( numberToString , stringToNumber , multiArgFn ) ( 'bar' , 42 , true ) ; const t11 = compose ( stringToNumber , numberToString , stringToNumber , multiArgFn ) ( 'bar' , 42 , true ) ; const funcs = [ stringToNumber , numberToString , stringToNumber ] ; const t12 = compose ( ... funcs ) ( 'bar' ) ;