Files
lo/docs/data/it-empty.md
T

607 B

name, slug, sourceRef, category, subCategory, signatures, playUrl, variantHelpers, similarHelpers, position
name slug sourceRef category subCategory signatures playUrl variantHelpers similarHelpers position
Empty empty it/type_manipulation.go#L44 it type
func Empty[T any]() iter.Seq[T]
https://go.dev/play/p/E5fF1hH8Bc3
it#type#empty
it#type#isempty
it#type#isnotempty
0

Returns an empty sequence of the specified type.

Examples:

emptySeq := it.Empty[int]()
count := 0
for range emptySeq {
    count++
}
// count == 0
emptySeq := it.Empty[string]()
var result []string
for v := range emptySeq {
    result = append(result, v)
}
// result is empty slice