minor fix + more .between(..)...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-08-14 13:46:22 +03:00
parent c996c03817
commit 1c1828efb2
2 changed files with 13 additions and 3 deletions

View File

@ -304,7 +304,7 @@ object.Constructor('IterablePromise', Promise, {
return i++ > 0 ?
[
typeof(func) == 'function' ?
func.call([prev, e], i, i + j++)
func.call(this, [prev, e], i, i + j++)
: func,
e,
]

View File

@ -581,8 +581,18 @@ object.Mixin('AsyncGeneratorProtoMixin', 'soft', {
// XXX BETWEEN...
between: async function*(func){
// XXX
},
var i = 0
var j = 0
var prev
yield* this.iter(function(e){
return i++ > 0 ?
[
typeof(func) == 'function' ?
func.call(this, [prev, e], i, i + j++, this))
: func,
e,
]
: [e] }) },
// XXX TEST...
chain: async function*(...next){