diff options
author | Runxi Yu <me@runxiyu.org> | 2025-04-05 23:22:51 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-04-05 23:22:51 +0800 |
commit | 38b24afcb653da88765c99049f850c3ec7e234db (patch) | |
tree | 9fa48eab9bd4ddff5323571b5746a72371628996 | |
parent | Remove unused types/functions (diff) | |
download | forge-38b24afcb653da88765c99049f850c3ec7e234db.tar.gz forge-38b24afcb653da88765c99049f850c3ec7e234db.tar.zst forge-38b24afcb653da88765c99049f850c3ec7e234db.zip |
misc: Move IterSeqLimit to misc
-rw-r--r-- | internal/misc/iter.go (renamed from iter.go) | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/iter.go b/internal/misc/iter.go index e237118..61a96f4 100644 --- a/iter.go +++ b/internal/misc/iter.go @@ -1,13 +1,13 @@ // SPDX-License-Identifier: AGPL-3.0-only // SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org> -package forge +package misc import "iter" // iterSeqLimit returns an iterator equivalent to the supplied one, but stops // after n iterations. -func iterSeqLimit[T any](s iter.Seq[T], n uint) iter.Seq[T] { +func IterSeqLimit[T any](s iter.Seq[T], n uint) iter.Seq[T] { return func(yield func(T) bool) { var iterations uint for v := range s { |