mirror of
https://github.com/nushell/nushell.git
synced 2025-04-23 12:48:22 +02:00
- closes #8523 # Description This PR adds pipeline input support to `generate`. - Without input, `generate` keeps its current behavior. - With input, each invocation of the closure is provided an item from the input stream as pipeline input (`$in`). If/when the input stream runs out, `generate` also stops. Before this PR, there is no filter command that is both stateful _and_ streaming. This PR also refactors `std/iter scan` to use `generate`, making it streaming and more performant over larger inputs. # User-Facing Changes - `generate` now supports pipeline input, passing each element to the closure as `$in` until it runs out - `std/iter scan` is now streaming # Tests + Formatting Added tests to validate the new feature. - 🟢 toolkit fmt - 🟢 toolkit clippy - 🟢 toolkit test - 🟢 toolkit test stdlib # After Submitting N/A |
||
---|---|---|
.. | ||
mod.nu |