# Function applyPairs

- applyPairs(memo, keyValTuple): any

- Reduce function which builds an object from an array of [key, value] pairs.

  Each iteration sets the key/val pair on the memo object, then returns the memo for the next iteration.

  Each keyValueTuple should be an array with values [ key: string, value: any ]

  #### Parameters

  - memo: any
  - keyValTuple: any

  #### Returns any

  #### Example

      var pairs = [ ["fookey", "fooval"], ["barkey", "barval"] ]

      var pairsToObj = pairs.reduce((memo, pair) => applyPairs(memo, pair), {})
      // pairsToObj == { fookey: "fooval", barkey: "barval" }

      // Or, more simply:
      var pairsToObj = pairs.reduce(applyPairs, {})
      // pairsToObj == { fookey: "fooval", barkey: "barval" }

  - Defined in shared/common.js:450