mirror of
https://github.com/samber/lo.git
synced 2026-04-22 23:47:11 +08:00
646 B
646 B
name, slug, sourceRef, category, subCategory, signatures, playUrl, variantHelpers, similarHelpers, position
| name | slug | sourceRef | category | subCategory | signatures | playUrl | variantHelpers | similarHelpers | position | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| IsEmpty | isempty | it/type_manipulation.go#L50 | it | type |
|
|
|
10 |
Returns true if the sequence is empty. Will consume the entire sequence to check.
Examples:
seq := func(yield func(int) bool) {
// empty sequence
}
empty := it.IsEmpty(seq)
// empty == true
seq := func(yield func(int) bool) {
_ = yield(1)
_ = yield(2)
}
empty := it.IsEmpty(seq)
// empty == false