Options
All
  • Public
  • Public/Protected
  • All
Menu

Module function/curry

Index

References

Functions

References

Renames and re-exports curry

Functions

  • curry<T1, TResult>(fn: (a: T1) => a is TResult): (a: T1) => a is T1
  • curry<T1, T2, TResult>(fn: (a: T1, b: T2) => b is TResult): CurriedTypeGuard2<T1, T2, TResult>
  • curry<T1, T2, T3, TResult>(fn: (a: T1, b: T2, c: T3) => c is TResult): CurriedTypeGuard3<T1, T2, T3, TResult>
  • curry<T1, T2, T3, T4, TResult>(fn: (a: T1, b: T2, c: T3, d: T4) => d is TResult): CurriedTypeGuard4<T1, T2, T3, T4, TResult>
  • curry<T1, T2, T3, T4, T5, TResult>(fn: (a: T1, b: T2, c: T3, d: T4, e: T5) => e is TResult): CurriedTypeGuard5<T1, T2, T3, T4, T5, TResult>
  • curry<T1, T2, T3, T4, T5, T6, TResult>(fn: (a: T1, b: T2, c: T3, d: T4, e: T5, f: T6) => f is TResult): CurriedTypeGuard6<T1, T2, T3, T4, T5, T6, TResult>
  • curry<TResult>(fn: () => TResult): () => TResult
  • curry<T1, TResult>(fn: (a: T1) => TResult): (a: T1) => TResult
  • curry<T1, T2, TResult>(fn: (a: T1, b: T2) => TResult): CurriedFunction2<T1, T2, TResult>
  • curry<T1, T2, T3, TResult>(fn: (a: T1, b: T2, c: T3) => TResult): CurriedFunction3<T1, T2, T3, TResult>
  • curry<T1, T2, T3, T4, TResult>(fn: (a: T1, b: T2, c: T3, d: T4) => TResult): CurriedFunction4<T1, T2, T3, T4, TResult>
  • curry<T1, T2, T3, T4, T5, TResult>(fn: (a: T1, b: T2, c: T3, d: T4, e: T5) => TResult): CurriedFunction5<T1, T2, T3, T4, T5, TResult>
  • curry<T1, T2, T3, T4, T5, T6, TResult>(fn: (a: T1, b: T2, c: T3, d: T4, e: T5, f: T6) => TResult): CurriedFunction6<T1, T2, T3, T4, T5, T6, TResult>
  • curry(fn: (...a: any[]) => any): (...a: any[]) => any
  • Returns a curried equivalent of the provided function. The arguments of curried function needn't be provided one at a time. If f is a ternary function and g is curry(f), the following are equivalent:

    • g(1)(2)(3)
    • g(1)(2, 3)
    • g(1, 2)(3)
    • g(1, 2, 3)
    example
     var addFourNumbers = (a, b, c, d) => a + b + c + d;

    var curriedAddFourNumbers = curry(addFourNumbers);
    var f = curriedAddFourNumbers(1, 2);
    var g = f(3);
    g(4); //=> 10

    Type parameters

    • T1

    • TResult

    Parameters

    • fn: (a: T1) => a is TResult

      The function to curry.

        • (a: T1): a is TResult
        • Parameters

          • a: T1

          Returns a is TResult

    Returns (a: T1) => a is T1

    A new, curried function.

      • (a: T1): a is T1
      • Parameters

        • a: T1

        Returns a is T1

  • Returns a curried equivalent of the provided function. The arguments of curried function needn't be provided one at a time. If f is a ternary function and g is curry(f), the following are equivalent:

    • g(1)(2)(3)
    • g(1)(2, 3)
    • g(1, 2)(3)
    • g(1, 2, 3)
    example
     var addFourNumbers = (a, b, c, d) => a + b + c + d;

    var curriedAddFourNumbers = curry(addFourNumbers);
    var f = curriedAddFourNumbers(1, 2);
    var g = f(3);
    g(4); //=> 10

    Type parameters

    • T1

    • T2

    • TResult

    Parameters

    • fn: (a: T1, b: T2) => b is TResult

      The function to curry.

        • (a: T1, b: T2): b is TResult
        • Parameters

          • a: T1
          • b: T2

          Returns b is TResult

    Returns CurriedTypeGuard2<T1, T2, TResult>

    A new, curried function.

  • Returns a curried equivalent of the provided function. The arguments of curried function needn't be provided one at a time. If f is a ternary function and g is curry(f), the following are equivalent:

    • g(1)(2)(3)
    • g(1)(2, 3)
    • g(1, 2)(3)
    • g(1, 2, 3)
    example
     var addFourNumbers = (a, b, c, d) => a + b + c + d;

    var curriedAddFourNumbers = curry(addFourNumbers);
    var f = curriedAddFourNumbers(1, 2);
    var g = f(3);
    g(4); //=> 10

    Type parameters

    • T1

    • T2

    • T3

    • TResult

    Parameters

    • fn: (a: T1, b: T2, c: T3) => c is TResult

      The function to curry.

        • (a: T1, b: T2, c: T3): c is TResult
        • Parameters

          • a: T1
          • b: T2
          • c: T3

          Returns c is TResult

    Returns CurriedTypeGuard3<T1, T2, T3, TResult>

    A new, curried function.

  • Returns a curried equivalent of the provided function. The arguments of curried function needn't be provided one at a time. If f is a ternary function and g is curry(f), the following are equivalent:

    • g(1)(2)(3)
    • g(1)(2, 3)
    • g(1, 2)(3)
    • g(1, 2, 3)
    example
     var addFourNumbers = (a, b, c, d) => a + b + c + d;

    var curriedAddFourNumbers = curry(addFourNumbers);
    var f = curriedAddFourNumbers(1, 2);
    var g = f(3);
    g(4); //=> 10

    Type parameters

    • T1

    • T2

    • T3

    • T4

    • TResult

    Parameters

    • fn: (a: T1, b: T2, c: T3, d: T4) => d is TResult

      The function to curry.

        • (a: T1, b: T2, c: T3, d: T4): d is TResult
        • Parameters

          • a: T1
          • b: T2
          • c: T3
          • d: T4

          Returns d is TResult

    Returns CurriedTypeGuard4<T1, T2, T3, T4, TResult>

    A new, curried function.

  • Returns a curried equivalent of the provided function. The arguments of curried function needn't be provided one at a time. If f is a ternary function and g is curry(f), the following are equivalent:

    • g(1)(2)(3)
    • g(1)(2, 3)
    • g(1, 2)(3)
    • g(1, 2, 3)
    example
     var addFourNumbers = (a, b, c, d) => a + b + c + d;

    var curriedAddFourNumbers = curry(addFourNumbers);
    var f = curriedAddFourNumbers(1, 2);
    var g = f(3);
    g(4); //=> 10

    Type parameters

    • T1

    • T2

    • T3

    • T4

    • T5

    • TResult

    Parameters

    • fn: (a: T1, b: T2, c: T3, d: T4, e: T5) => e is TResult

      The function to curry.

        • (a: T1, b: T2, c: T3, d: T4, e: T5): e is TResult
        • Parameters

          • a: T1
          • b: T2
          • c: T3
          • d: T4
          • e: T5

          Returns e is TResult

    Returns CurriedTypeGuard5<T1, T2, T3, T4, T5, TResult>

    A new, curried function.

  • Returns a curried equivalent of the provided function. The arguments of curried function needn't be provided one at a time. If f is a ternary function and g is curry(f), the following are equivalent:

    • g(1)(2)(3)
    • g(1)(2, 3)
    • g(1, 2)(3)
    • g(1, 2, 3)
    example
     var addFourNumbers = (a, b, c, d) => a + b + c + d;

    var curriedAddFourNumbers = curry(addFourNumbers);
    var f = curriedAddFourNumbers(1, 2);
    var g = f(3);
    g(4); //=> 10

    Type parameters

    • T1

    • T2

    • T3

    • T4

    • T5

    • T6

    • TResult

    Parameters

    • fn: (a: T1, b: T2, c: T3, d: T4, e: T5, f: T6) => f is TResult

      The function to curry.

        • (a: T1, b: T2, c: T3, d: T4, e: T5, f: T6): f is TResult
        • Parameters

          • a: T1
          • b: T2
          • c: T3
          • d: T4
          • e: T5
          • f: T6

          Returns f is TResult

    Returns CurriedTypeGuard6<T1, T2, T3, T4, T5, T6, TResult>

    A new, curried function.

  • Returns a curried equivalent of the provided function. The arguments of curried function needn't be provided one at a time. If f is a ternary function and g is curry(f), the following are equivalent:

    • g(1)(2)(3)
    • g(1)(2, 3)
    • g(1, 2)(3)
    • g(1, 2, 3)
    example
     var addFourNumbers = (a, b, c, d) => a + b + c + d;

    var curriedAddFourNumbers = curry(addFourNumbers);
    var f = curriedAddFourNumbers(1, 2);
    var g = f(3);
    g(4); //=> 10

    Type parameters

    • TResult

    Parameters

    • fn: () => TResult

      The function to curry.

        • (): TResult
        • Returns TResult

    Returns () => TResult

    A new, curried function.

      • (): TResult
      • Returns TResult

  • Returns a curried equivalent of the provided function. The arguments of curried function needn't be provided one at a time. If f is a ternary function and g is curry(f), the following are equivalent:

    • g(1)(2)(3)
    • g(1)(2, 3)
    • g(1, 2)(3)
    • g(1, 2, 3)
    example
     var addFourNumbers = (a, b, c, d) => a + b + c + d;

    var curriedAddFourNumbers = curry(addFourNumbers);
    var f = curriedAddFourNumbers(1, 2);
    var g = f(3);
    g(4); //=> 10

    Type parameters

    • T1

    • TResult

    Parameters

    • fn: (a: T1) => TResult

      The function to curry.

        • (a: T1): TResult
        • Parameters

          • a: T1

          Returns TResult

    Returns (a: T1) => TResult

    A new, curried function.

      • (a: T1): TResult
      • Parameters

        • a: T1

        Returns TResult

  • Returns a curried equivalent of the provided function. The arguments of curried function needn't be provided one at a time. If f is a ternary function and g is curry(f), the following are equivalent:

    • g(1)(2)(3)
    • g(1)(2, 3)
    • g(1, 2)(3)
    • g(1, 2, 3)
    example
     var addFourNumbers = (a, b, c, d) => a + b + c + d;

    var curriedAddFourNumbers = curry(addFourNumbers);
    var f = curriedAddFourNumbers(1, 2);
    var g = f(3);
    g(4); //=> 10

    Type parameters

    • T1

    • T2

    • TResult

    Parameters

    • fn: (a: T1, b: T2) => TResult

      The function to curry.

        • (a: T1, b: T2): TResult
        • Parameters

          • a: T1
          • b: T2

          Returns TResult

    Returns CurriedFunction2<T1, T2, TResult>

    A new, curried function.

  • Returns a curried equivalent of the provided function. The arguments of curried function needn't be provided one at a time. If f is a ternary function and g is curry(f), the following are equivalent:

    • g(1)(2)(3)
    • g(1)(2, 3)
    • g(1, 2)(3)
    • g(1, 2, 3)
    example
     var addFourNumbers = (a, b, c, d) => a + b + c + d;

    var curriedAddFourNumbers = curry(addFourNumbers);
    var f = curriedAddFourNumbers(1, 2);
    var g = f(3);
    g(4); //=> 10

    Type parameters

    • T1

    • T2

    • T3

    • TResult

    Parameters

    • fn: (a: T1, b: T2, c: T3) => TResult

      The function to curry.

        • (a: T1, b: T2, c: T3): TResult
        • Parameters

          • a: T1
          • b: T2
          • c: T3

          Returns TResult

    Returns CurriedFunction3<T1, T2, T3, TResult>

    A new, curried function.

  • Returns a curried equivalent of the provided function. The arguments of curried function needn't be provided one at a time. If f is a ternary function and g is curry(f), the following are equivalent:

    • g(1)(2)(3)
    • g(1)(2, 3)
    • g(1, 2)(3)
    • g(1, 2, 3)
    example
     var addFourNumbers = (a, b, c, d) => a + b + c + d;

    var curriedAddFourNumbers = curry(addFourNumbers);
    var f = curriedAddFourNumbers(1, 2);
    var g = f(3);
    g(4); //=> 10

    Type parameters

    • T1

    • T2

    • T3

    • T4

    • TResult

    Parameters

    • fn: (a: T1, b: T2, c: T3, d: T4) => TResult

      The function to curry.

        • (a: T1, b: T2, c: T3, d: T4): TResult
        • Parameters

          • a: T1
          • b: T2
          • c: T3
          • d: T4

          Returns TResult

    Returns CurriedFunction4<T1, T2, T3, T4, TResult>

    A new, curried function.

  • Returns a curried equivalent of the provided function. The arguments of curried function needn't be provided one at a time. If f is a ternary function and g is curry(f), the following are equivalent:

    • g(1)(2)(3)
    • g(1)(2, 3)
    • g(1, 2)(3)
    • g(1, 2, 3)
    example
     var addFourNumbers = (a, b, c, d) => a + b + c + d;

    var curriedAddFourNumbers = curry(addFourNumbers);
    var f = curriedAddFourNumbers(1, 2);
    var g = f(3);
    g(4); //=> 10

    Type parameters

    • T1

    • T2

    • T3

    • T4

    • T5

    • TResult

    Parameters

    • fn: (a: T1, b: T2, c: T3, d: T4, e: T5) => TResult

      The function to curry.

        • (a: T1, b: T2, c: T3, d: T4, e: T5): TResult
        • Parameters

          • a: T1
          • b: T2
          • c: T3
          • d: T4
          • e: T5

          Returns TResult

    Returns CurriedFunction5<T1, T2, T3, T4, T5, TResult>

    A new, curried function.

  • Returns a curried equivalent of the provided function. The arguments of curried function needn't be provided one at a time. If f is a ternary function and g is curry(f), the following are equivalent:

    • g(1)(2)(3)
    • g(1)(2, 3)
    • g(1, 2)(3)
    • g(1, 2, 3)
    example
     var addFourNumbers = (a, b, c, d) => a + b + c + d;

    var curriedAddFourNumbers = curry(addFourNumbers);
    var f = curriedAddFourNumbers(1, 2);
    var g = f(3);
    g(4); //=> 10

    Type parameters

    • T1

    • T2

    • T3

    • T4

    • T5

    • T6

    • TResult

    Parameters

    • fn: (a: T1, b: T2, c: T3, d: T4, e: T5, f: T6) => TResult

      The function to curry.

        • (a: T1, b: T2, c: T3, d: T4, e: T5, f: T6): TResult
        • Parameters

          • a: T1
          • b: T2
          • c: T3
          • d: T4
          • e: T5
          • f: T6

          Returns TResult

    Returns CurriedFunction6<T1, T2, T3, T4, T5, T6, TResult>

    A new, curried function.

  • Returns a curried equivalent of the provided function. The arguments of curried function needn't be provided one at a time. If f is a ternary function and g is curry(f), the following are equivalent:

    • g(1)(2)(3)
    • g(1)(2, 3)
    • g(1, 2)(3)
    • g(1, 2, 3)
    example
     var addFourNumbers = (a, b, c, d) => a + b + c + d;

    var curriedAddFourNumbers = curry(addFourNumbers);
    var f = curriedAddFourNumbers(1, 2);
    var g = f(3);
    g(4); //=> 10

    Parameters

    • fn: (...a: any[]) => any

      The function to curry.

        • (...a: any[]): any
        • Parameters

          • Rest ...a: any[]

          Returns any

    Returns (...a: any[]) => any

    A new, curried function.

      • (...a: any[]): any
      • Parameters

        • Rest ...a: any[]

        Returns any

Generated using TypeDoc