Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func All ¶
All returns true if all values in the iterator satisfy the predicate. If no predicate is provided, it defaults to checking if a value is a zero value for its type.
Example ¶
package main
import (
"fmt"
"slices"
"github.com/elordeiro/goext/algorithms/search"
)
func main() {
seq := slices.Values([]bool{true, true, true, true, true})
fmt.Println(search.All(seq))
}
Output: true
func Any ¶
Any returns true if any value in the iterator satisfies the predicate. If no predicate is provided, it defaults to checking if a value is a zero value for its type.
Example ¶
package main
import (
"fmt"
"slices"
"github.com/elordeiro/goext/algorithms/search"
)
func main() {
seq := slices.Values([]bool{true, false, true, false, true})
fmt.Println(search.Any(seq))
}
Output: true
func None ¶
None returns true if no value in the iterator satisfies the predicate. If no predicate is provided, it defaults to checking if a value is a zero value for its type.
Example ¶
package main
import (
"fmt"
"slices"
"github.com/elordeiro/goext/algorithms/search"
)
func main() {
seq := slices.Values([]bool{true, false, true, false, true})
fmt.Println(search.None(seq))
}
Output: false
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.