import { Fn , Uncurry } from './types' ; param fn returns export function uncurry < F extends Fn > ( f ) { if ( typeof f !== 'function' || f . length === 0 ) { return f as Uncurry < F > ; } return ( function ( ) { let r = f ; for ( let i = 0 ; i < arguments . length ; i ++ ) { r = r ( arguments [ i ] ) ; } return uncurry ( r ) ; } as any ) as Uncurry < F > ; }