function PromiseAllSettledRejectElement () {
      /* @id __aux_PromiseAllSettledRejectElement */
      var f = (x) => {
        if (f.AlreadyCalled.value)
          return undefined;
        f.AlreadyCalled.value = true;
        var index = f.Index;
        var values = f.Values;
        var promiseCapability = f.Capability;
        var remainingElementsCount = f.RemainingElements;
        values[index] = { status: "rejected", reason: x };
        remainingElementsCount.value--;
        if (remainingElementsCount.value === 0) {
          return (promiseCapability.Resolve).call(undefined, values)
        }
        return undefined
      };
      return f;
    }
/** BONUS: Promise.allSettled Reject Element Function
     *
     * @id p__PromiseAllSettledRejectElement
    */
Promise.allSettled Reject Element Function
@id p__PromiseAllSettledRejectElement
Promise . allSettled Reject Element Function @id p__PromiseAllSettledRejectElement
function PromiseAllSettledRejectElement () {
      var f = (x) => {
        if (f.AlreadyCalled.value)
          return undefined;
        f.AlreadyCalled.value = true;
        var index = f.Index;
        var values = f.Values;
        var promiseCapability = f.Capability;
        var remainingElementsCount = f.RemainingElements;
        values[index] = { status: "rejected", reason: x };
        remainingElementsCount.value--;
        if (remainingElementsCount.value === 0) {
          return (promiseCapability.Resolve).call(undefined, values)
        }
        return undefined
      };
      return f;
    }
function PromiseAllSettledRejectElement ( ) { var f = ( x ) => { if ( f . AlreadyCalled . value ) return undefined ; f . AlreadyCalled . value = true ; var index = f . Index ; var values = f . Values ; var promiseCapability = f . Capability ; var remainingElementsCount = f . RemainingElements ; values [ index ] = { status : "rejected" , reason : x } ; remainingElementsCount . value -- ; if ( remainingElementsCount . value === 0 ) { return ( promiseCapability . Resolve ) . call ( undefined , values ) } return undefined } ; return f ; }
BONUS: Promise.allSettled Reject Element Function
 @id p__PromiseAllSettledRejectElement
BONUS : Promise . allSettled Reject Element Function @id p__PromiseAllSettledRejectElement
/* @id __aux_PromiseAllSettledRejectElement */