From 3a4653f2615fe0891e3b3722fff35886579a15bf Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sat, 11 Jun 2022 11:36:13 +0300 Subject: [PATCH] notes... Signed-off-by: Alex A. Naanou --- Promise.js | 9 +++++++-- README.md | 12 ++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Promise.js b/Promise.js index e37c57e..85352fa 100644 --- a/Promise.js +++ b/Promise.js @@ -173,12 +173,17 @@ object.Constructor('IterablePromise', Promise, { // is called not in the order of the elements but rather in order // of promise resolution... // NOTE: index of items is unknowable because items can expand and - // contract depending on handlrs (e.g. .filter(..) can remove + // contract depending on handlers (e.g. .filter(..) can remove // items)... // Thus the following can not be implemented here: // .splice(..) - can't both modify and return // a result... - // [Symbol.iterator]() - needs to be sync... + // .pop() / .shift() - can't modify the promise, use + // .first() / .last() instead. + // [Symbol.iterator]() - needs to be sync and we can't + // know the number of elements to + // return promises before the whole + // iterable promise is resolved. // These are direct poxies requiring the whole promuse to // resolve: // .at(..) / .first() / .last() diff --git a/README.md b/README.md index 4f7f06a..889a961 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,8 @@ Library of JavaScript type extensions, types and utilities. - [`.reverse()`](#promise-iterreverse) - [`.concat(..)`](#promise-iterconcat) - [`.push(..)` / `.unshift(..)`](#promise-iterpush--promise-iterunshift) + - [`.at(..)` / `.first()` / `.last()`](#promise-iterat--promise-iterfirst--promise-iterlast) + - [Array proxy methods](#array-proxy-methods) - [`.then(..)` / `.catch(..)` / `.finally(..)`](#promise-iterthen--promise-itercatch--promise-iterfinally) - [Advanced handler](#advanced-handler) - [Promise proxies](#promise-proxies) @@ -1663,6 +1665,16 @@ and [`.unshift(..)`](https://developer.mozilla.org/en-US/docs/Web/JavaScr see them for more info. +#### `.at(..)` / `.first()` / `.last()` + +XXX + + +#### Array proxy methods + +XXX + + #### `.then(..)` / `.catch(..)` / `.finally(..)` An extension to