mirror of
https://github.com/flynx/types.js.git
synced 2025-10-29 02:20:07 +00:00
Merge branch 'master' of github.com:flynx/types.js
This commit is contained in:
commit
e7d785900d
14
README.md
14
README.md
@ -1640,8 +1640,8 @@ Equivalents to `Array`'s `.map(..)`, `.filter(..)` and `.reduce(..)` but return
|
||||
generators that yield the handler return values.
|
||||
|
||||
<!--
|
||||
XXX doc all differences (revise)
|
||||
XXX .reduce(..) can return a non-iterable -- test and document this case...
|
||||
...compare with Array.prototype.reduce(..)
|
||||
-->
|
||||
|
||||
|
||||
@ -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