code: function toPairs(obj) {
    if(!isObject(obj)) {
      throw new TypeError('toPairs: Object required for argument')
    }
  
    return Object.keys(obj).reduce(
      (acc, key) => obj[key] !== undefined
        ? acc.concat(List.of(Pair(key, obj[key])))
        : acc,
      List.empty()
    )
  }
docs: toPairs : Object -> List (Pair String a)