export const first = < T > ( arr ) => arr [ 0 ] ; export const last = < T > ( arr ) => arr [ arr . length - 1 ] ; export const split = ( del ) => ( str ) => str . split ( del ) ; export function pipe < Param , Return > ( fn1 , ... fns ) { return fns . reduce ( ( prevFn , nextFn ) => ( value ) => nextFn ( prevFn ( value ) ) , fn1 ) ; }