From: Lady Date: Sat, 22 Jul 2023 06:30:50 +0000 (-0700) Subject: Add iterator function builders; use in string.js X-Git-Url: https://git.ladys.computer/Pisces/commitdiff_plain/bf3fe705a9d5f717b3c1794a12726e926ece7ecc?ds=inline;hp=bf3fe705a9d5f717b3c1794a12726e926ece7ecc Add iterator function builders; use in string.js This commit adds a number of new `⸺IteratorFunction` functions in a new `iterable.js` module, for building “iterator functions” from various kinds of iterable object (as well as generator functions, which are not themselves iterable). These functions are useful metaprogramming tools for creating iterators akin to those produced by the native Ecmascript builtins like `Array::values` or `Map::entries` when starting from an already‐iterable base value but needing to map it somehow. The existing functions `codeUnits`, `codepoints`, and `scalarValues` already fell into this category and have been refactored to make use of the new technique. ---