Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-06-15 10:36:33 +03:00
parent 4a356cdd51
commit 0595479171

View File

@ -76,7 +76,6 @@ function(name){
var IterablePromise =
module.IterablePromise =
object.Constructor('IterablePromise', Promise, {
// XXX EXPEREMENTAL: STOP...
get STOP(){
return Array.STOP },
@ -356,6 +355,7 @@ object.Constructor('IterablePromise', Promise, {
var list = this.__packed
return ((i != 0 && i != -1)
|| list instanceof Promise
// XXX not sure if this is correct...
|| list.at(i) instanceof Promise) ?
(await this).at(i)
// NOTE: we can only reason about first/last explicit elements,
@ -453,6 +453,12 @@ object.Constructor('IterablePromise', Promise, {
every: promiseProxy('every'),
// this is defined globally as Promise.prototype.iter(..)
//
// for details see: PromiseMixin(..) below...
//iter: function(handler=undefined){ ... },
// promise api...
//
// Overload .then(..), .catch(..) and .finally(..) to return a plain
@ -480,12 +486,6 @@ object.Constructor('IterablePromise', Promise, {
: p },
// this is defined globally as Promise.prototype.iter(.,)
//
// for details see: PromiseMixin(..) below...
//iter: function(handler=undefined){ ... },
// constructor...
//
// Promise.iter([ .. ])