import { Arity5 , Curry5 } from '../types' ; import { curry2 } from './curry2' ; import { curry3 } from './curry3' ; import { curry4 } from './curry4' ; export function curry5 < A , B , C , D , E , F > ( fn ) ; export function curry5 ( fn ) ; export function curry5 < A , B , C , D , E , F > ( fn ) { function curried ( a , b , c , d , e ) { switch ( arguments . length ) { case 1 : return curry4 < B , C , D , E , F > ( ( b , c , d , e ) => fn ( a , b , c , d , e ) ) ; case 2 : return curry3 < C , D , E , F > ( ( c , d , e ) => fn ( a , b , c , d , e ) ) ; case 3 : return curry2 < D , E , F > ( ( d , e ) => fn ( a , b , c , d , e ) ) ; case 4 : return ( e ) => fn ( a , b , c , d , e ) ; default : return fn ( a , b , c , d , e ) ; } } return curried as Curry5 < A , B , C , D , E , F > ; }