Files
lo/docs/data/it-repeat.md
T
Samuel Berthe fa095e4b4f fix(doc): fix go playground demo URL (#832)
* fix(doc): fix go playground demo URL

* fix(doc): add more go playground demo URL
2026-03-06 00:09:59 +01:00

470 B

name, slug, sourceRef, category, subCategory, signatures, playUrl, variantHelpers, similarHelpers, position
name slug sourceRef category subCategory signatures playUrl variantHelpers similarHelpers position
Repeat repeat it/seq.go#L384 it sequence
func Repeat[T lo.Clonable[T]](count int, initial T) iter.Seq[T]
https://go.dev/play/p/xs-aq0p_uDP
it#slice#repeatby
core#slice#repeat
core#slice#repeatby
75

Creates a sequence that repeats the initial value count times.

result := it.Repeat(3, "hello")
// ["hello", "hello", "hello"]