Function swap

  • Exchange two values in an object.

    Parameters

    • x: object

      an object

    • k: string

      a key

    • l: string

      another key

    Returns object

    x' | x' = x; x'[k] = x[l]; x'[l] = x[k]

Generated using TypeDoc