Function tup

  • Constructs a tuple object.

    Parameters

    • Rest ...fields: any[]

    Returns ((...args) => any)

      • (...args): any
      • Parameters

        • Rest ...args: any[]

        Returns any

    Example

    sum_vectors(tup(1, 2), tup(3, 4));
    

    Example

    const person = tup("John", "Doe")({
    age: 30,
    });

    console.log(await person[0]());
    console.log(await person[1]());
    console.log(await person.age());

Generated using TypeDoc