mirror of
https://github.com/flynx/types.js.git
synced 2025-10-29 02:20:07 +00:00
minor fix + more .between(..)...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
c996c03817
commit
1c1828efb2
@ -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,
|
||||
]
|
||||
|
||||
14
generator.js
14
generator.js
@ -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){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user