Returns (<Item>(iterable) => {
[iterator]() => IterableIterator<Separator | Item>;
next(...args) => IteratorResult<Separator | Item, any>;
return?(value?) => IteratorResult<Separator | Item, any>;
throw?(e?) => IteratorResult<Separator | Item, any>;
})
Curried function with separator
in context.
-
- <Item>(iterable): {
[iterator]() => IterableIterator<Separator | Item>;
next(...args) => IteratorResult<Separator | Item, any>;
return?(value?) => IteratorResult<Separator | Item, any>;
throw?(e?) => IteratorResult<Separator | Item, any>;
}
-
Parameters
-
iterable: IsomorphicIterable<Item>
Returns {
[iterator]() => IterableIterator<Separator | Item>;
next(...args) => IteratorResult<Separator | Item, any>;
return?(value?) => IteratorResult<Separator | Item, any>;
throw?(e?) => IteratorResult<Separator | Item, any>;
}
-
[iterator]:function
- [iterator](): IterableIterator<Separator | Item>
-
Returns IterableIterator<Separator | Item>
-
next:function
- next(...args): IteratorResult<Separator | Item, any>
-
Parameters
-
Rest
...args: [] | [undefined]
Returns IteratorResult<Separator | Item, any>
-
return?:function
- return(value?): IteratorResult<Separator | Item, any>
-
Returns IteratorResult<Separator | Item, any>
-
throw?:function
- throw(e?): IteratorResult<Separator | Item, any>
-
Returns IteratorResult<Separator | Item, any>
Add the given
separator
between each element of the given iterable or asynchronous iterable.Example