]> Cypherpunks repositories - gostls13.git/commit
slices: add Chunk
authorMatt Layher <mdlayher@gmail.com>
Fri, 9 Feb 2024 15:34:58 +0000 (10:34 -0500)
committerGopher Robot <gobot@golang.org>
Fri, 10 May 2024 17:28:50 +0000 (17:28 +0000)
commitf6c3a3e3c8c532e73e9dff7acdf04e2b4d5d9537
tree784a3a54c89a901efaa9bb86c9d0489785103306
parent69c74c9ea932f284364b0cac72a454a4e56d4ab2
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>
api/next/53987.txt [new file with mode: 0644]
doc/next/6-stdlib/3-iter.md
doc/next/6-stdlib/99-minor/slices/53987.md [new file with mode: 0644]
src/slices/example_test.go
src/slices/iter.go
src/slices/iter_test.go