mirror of
https://github.com/flynx/types.js.git
synced 2025-12-19 09:51:40 +00:00
docs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
bf8afa04fc
commit
3acf8862fe
12
README.md
12
README.md
@ -1654,15 +1654,11 @@ XXX .reduce(..) can return a non-iterable -- test and document this case...
|
||||
-> <generator>
|
||||
```
|
||||
|
||||
<!-- XXX -->
|
||||
Note that this does not support negative indexes as it not possible to know the
|
||||
generator length until it is fully done.
|
||||
|
||||
|
||||
<!-- XXX check this
|
||||
This does not support negative indexes.
|
||||
-->
|
||||
|
||||
Equivalent to `Array`'s `.slice(..)` but will return a generator instead of an
|
||||
array, for more info see:
|
||||
Otherwise this is similar to `Array`'s `.slice(..)` but will return a generator
|
||||
instead of an array, for more info see:
|
||||
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice
|
||||
|
||||
|
||||
|
||||
@ -180,7 +180,7 @@ object.Mixin('GeneratorProtoMixin', 'soft', {
|
||||
|
||||
// NOTE: this is different from Array's .slice(..) in that it does not
|
||||
// support negative indexes -- this is done because there is no way
|
||||
// to judge the length of a generator untill it is fully done...
|
||||
// to judge the length of a generator until it is fully done...
|
||||
slice: function*(from=0, to=Infity){
|
||||
// sanity check...
|
||||
if(from < 0 || to < 0){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user