nushell/crates/nu-std/tests
Bahex cfdb4bbf25
std/iter scan: change closure signature to be consistent with reduce (#14596)
# Description

I noticed that `std/iter scan`'s closure has the order of parameters
reversed compared to `reduce`, so changed it to be consistent.

Also it didn't have `$acc` as `$in` like `reduce`, so fixed that as
well.

# User-Facing Changes

> [!WARNING]
> This is a breaking change for all operations where order of `$it` and
`$acc` matter.

-   This is still fine.
    ```nushell
    [1 2 3] | iter scan 0 {|x, y| $x + $y}
    ```

-   This is broken
    ```nushell
    [a b c d] | iter scan "" {|x, y| [$x, $y] | str join} -n
    ```
    and should be changed to either one of these
    -   ```nushell
        [a b c d] | iter scan "" {|it, acc| [$acc, $it] | str join} -n
        ```
    -   ```nushell
        [a b c d] | iter scan "" {|it| append $it | str join} -n
        ```

# Tests + Formatting
Only change is in the std and its tests
- 🟢 toolkit test stdlib

# After Submitting
Mention in release notes
2024-12-16 06:13:51 -06:00
..
logger_tests Improves startup time when using std-lib (#13842) 2024-10-03 06:28:22 -05:00
test_asserts.nu Improves startup time when using std-lib (#13842) 2024-10-03 06:28:22 -05:00
test_core.nu Improves startup time when using std-lib (#13842) 2024-10-03 06:28:22 -05:00
test_dirs.nu Improves startup time when using std-lib (#13842) 2024-10-03 06:28:22 -05:00
test_dt.nu Improves startup time when using std-lib (#13842) 2024-10-03 06:28:22 -05:00
test_formats.nu fix multiline strings in NDNUON (#14519) 2024-12-05 07:53:33 -06:00
test_help.nu Improves startup time when using std-lib (#13842) 2024-10-03 06:28:22 -05:00
test_iter.nu std/iter scan: change closure signature to be consistent with reduce (#14596) 2024-12-16 06:13:51 -06:00
test_setup_teardown.nu Improves startup time when using std-lib (#13842) 2024-10-03 06:28:22 -05:00
test_std_formats.nu fix multiline strings in NDNUON (#14519) 2024-12-05 07:53:33 -06:00
test_std_postload.nu Improves startup time when using std-lib (#13842) 2024-10-03 06:28:22 -05:00
test_std_preload.nu Improves startup time when using std-lib (#13842) 2024-10-03 06:28:22 -05:00
test_std_util.nu Fix dirs removal warning (#14029) 2024-10-09 08:03:33 -05:00
test_util.nu Fix dirs removal warning (#14029) 2024-10-09 08:03:33 -05:00
test_xml.nu Improves startup time when using std-lib (#13842) 2024-10-03 06:28:22 -05:00