]> Lady’s Gitweb - Pisces/commit
Add iterator function builders; use in string.js
authorLady <redacted>
Sat, 22 Jul 2023 06:30:50 +0000 (23:30 -0700)
committerLady <redacted>
Sat, 22 Jul 2023 06:33:21 +0000 (23:33 -0700)
commitbf3fe705a9d5f717b3c1794a12726e926ece7ecc
tree40c3c3faa91118c1eeac5aada26bd55b5d744ffa
parentd741139aff475642fe08978d39722b298cf96802
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.
iterable.js [new file with mode: 0644]
iterable.test.js [new file with mode: 0644]
mod.js
string.js
string.test.js
This page took 0.019424 seconds and 4 git commands to generate.