curry : ((a, b, c) -> d) -> a -> b -> c -> d
769012
function curry(fn) {
  return function(...xs) {
    const args =
      xs.length ? xs : [ undefined ]

    if(args.length < fn.length) {
      return curry(Function.bind.apply(fn, [ null ].concat(args)))
    }

    const val = args.length === fn.length
      ? fn.apply(null, args)
      : args.reduce(applyCurry, fn)

    if(isFunction(val)) {
      return curry(val)
    }

    return val
  }
}
915229
def logical_and(self, other):
        """"""
        return self.operation(other, lambda x, y: int(x and y))
849254
function union(list1, list2, duplicate=false) {
    if ( arguments.length < 2 ) {
      // Manually currying
      let args1 = arguments;

      return (...args2) => union(...args1, ...args2);
    } else if (arguments.length === 2 && (! Array.isArray(list2))) {
      // curring union(_, list, duplicate) cases
      // Manually currying
      let args = arguments;
      return (list) => union(list, ...args);
    }

    if(duplicate) {
      return differenceWithDup([],list1.concat(list2));
    }
    return difference([],list1.concat(list2));
  }
51648
function clamp (x, a, b) {
  return (x < a) ? a : ((x > b) ? b : x);
}
115065
def max3(a,b,c)
      (a >= b) ? ((a >= c)? a : c) : ((b >= c)? b : c)
    end
634328
function curry( func ) {
    var args = aps.call( arguments, 1 );
    
    return function() {
      return func.apply( this, args.concat( aps.call( arguments ) ) );
    };
  }
271889
function a7(a) {
        a = a | 0;
        var b = 0;
        b = i;
        i = i + a | 0;
        i = i + 7 >> 3 << 3;
        return b | 0;
      }
185753
function(c, a) {
      var l = (
        (c.x * a.x + c.y * a.y) /
        (Math.pow(a.x, 2) + Math.pow(a.y, 2))
      );

      return {
        x: l * a.x,
        y: l * a.y
      };
    }
462355
function innerEquiv( a, b ) {

		// We're done when there's nothing more to compare
		if ( arguments.length < 2 ) {
			return true;
		}

		// Require type-specific equality
		return ( a === b || typeEquiv( a, b ) ) &&

			// ...across all consecutive argument pairs
			( arguments.length === 2 || innerEquiv.apply( this, [].slice.call( arguments, 1 ) ) );
	}
930788
function O(a, b, f) {
  let g = a[a.length - 1];
  g && g.c === b && g.g === f ? a[a.length - 1] = {count:g.count + 1, c:b, g:f} : a.push({count:1, c:b, g:f});
}
348227
function lt (a, b, c) {
		compare.call(this, a, b, c, '__lt', lt_func);
	}
674984
function eq (a,b) {
	if (a && a.length) return a[0] === b[0] && a[1] === b[1];
	return a === b;
}
302120
private static boolean leq(int a1, int a2, int b1, int b2) {
        return (a1 < b1 || (a1 == b1 && a2 <= b2));
    }
1050792
def _(f, x):
    
    return {k: v for k, v in x.items() if f(k, v)}
163694
def maybe_curry(maybe_fn, first_arg) -> 'Function | Any':
    
    if not callable(maybe_fn):
        return maybe_fn
    return tz.curry(maybe_fn)(first_arg)
789446
function _curry3 (fn, isRightCurry) {
    return function (a) {
        return function (b) {
            return function (c) {
                return isRightCurry ? fn.call(this, c, b, a) : fn.call(this, a, b, c);
            };
        };
    };
}
1328780
function compit(ca,cb,aa,ab) {
            return (ca*aa + cb*ab * (1-aa)) / (aa+ab*(1-aa));
        }