diff --git a/README.md b/README.md index a41cd79..2a9df4b 100644 --- a/README.md +++ b/README.md @@ -1417,7 +1417,7 @@ XXX should we support infinite generators as input? Create an _iterable promise_ ```bnf Promise.iter() - -> + -> ``` @@ -1425,11 +1425,40 @@ Promise.iter() +```bnf +.map() + -> + +.filter() + -> + +() +``` + +```bnf +.reduce(, ) + -> + +(, ) +``` + +Note that these are different to `Array`'s equivalents in some details: +- `` is _not_ called in the order of element occurrence but rather + in the order of elements are resolved/ready. +- `` does not get either the element _index_ or the _container_. + this is because the index with _out-of-order_ and _depth-first_ execution the + index is unknowable and the container is a promise/black-box. + #### `.flat(..)` - +```bnf +.flat() +.flat() + -> +``` +This is similar to [`.flat(..)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat) see it for more info. #### `.then(..)` / `.catch(..)` / `.finally(..)`