diff options
author | Matt Layher <mdlayher@gmail.com> | 2024-02-09 10:34:58 -0500 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2024-05-10 17:28:50 +0000 |
commit | f6c3a3e3c8c532e73e9dff7acdf04e2b4d5d9537 (patch) | |
tree | 784a3a54c89a901efaa9bb86c9d0489785103306 /doc/next | |
parent | 69c74c9ea932f284364b0cac72a454a4e56d4ab2 (diff) | |
download | go-f6c3a3e3c8c532e73e9dff7acdf04e2b4d5d9537.tar.gz go-f6c3a3e3c8c532e73e9dff7acdf04e2b4d5d9537.zip |
slices: add Chunk
Chunk returns an iterator over consecutive sub-slices of up to n elements of s.
Fixes #53987.
Change-Id: I508274eca388db39550eb9e4d8abd5ce68d29d8d
Reviewed-on: https://go-review.googlesource.com/c/go/+/562935
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'doc/next')
-rw-r--r-- | doc/next/6-stdlib/3-iter.md | 2 | ||||
-rw-r--r-- | doc/next/6-stdlib/99-minor/slices/53987.md | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/doc/next/6-stdlib/3-iter.md b/doc/next/6-stdlib/3-iter.md index bc74f4556c..6b52b7c7e5 100644 --- a/doc/next/6-stdlib/3-iter.md +++ b/doc/next/6-stdlib/3-iter.md @@ -19,3 +19,5 @@ with iterators: comparison function. - [SortedStableFunc](/pkg/slices#SortedStableFunc) is like `SortFunc` but uses a stable sort algorithm. +- [Chunk](/pkg/slices#Chunk) returns an iterator over consecutive + sub-slices of up to n elements of a slice. diff --git a/doc/next/6-stdlib/99-minor/slices/53987.md b/doc/next/6-stdlib/99-minor/slices/53987.md new file mode 100644 index 0000000000..02d77cd11d --- /dev/null +++ b/doc/next/6-stdlib/99-minor/slices/53987.md @@ -0,0 +1 @@ +<!-- see ../../3-iter.md --> |