function flip(fn) {
  if (typeof fn !== 'function') {
    throw new Error('N.flip is not able to work with non funciton values');
  }

  return curryN(fn.length, (...args) => fn(...reverse(args)));
}
/**
 * Takes function and returs function that acts the same as received, but accepts arguments in reversed order.
 *
 * @since v1.0.0
 * @category Function
 *
 * @param {Function} fn
 * @return {Function}
 *
 * @example
 * N.flip((a, b) => `${a}${b}`)('f', 'g'); // -> 'gf'
 * N.flip((a, b, c) => `${a}${b}${c}`)('f', 'g', 'h'); // -> 'hgf'
 */
Takes function and returs function that acts the same as received, but accepts arguments in reversed order.

@param {Function} fn
@return {Function}


Takes function and returs function that acts the same as received but accepts arguments in reversed order . @param { Function } fn @return { Function }
function flip(fn) {
  if (typeof fn !== 'function') {
    throw new Error('N.flip is not able to work with non funciton values');
  }
  return curryN(fn.length, (...args) => fn(...reverse(args)));
}
function flip ( fn ) { if ( typeof fn !== 'function' ) { throw new Error ( 'N.flip is not able to work with non funciton values' ) ; } return curryN ( fn . length , ( ... args ) => fn ( ... reverse ( args ) ) ) ; }
Takes function and returs function that acts the same as received, but accepts arguments in reversed order.
Takes function and returs function that acts the same as received but accepts arguments in reversed order .