Documentation ΒΆ
Index ΒΆ
- func Chain[E any](seq iter.Seq[E], steps ...Step[E, E]) iter.Seq[E]
- func Parallel[E any](size int, items iter.Seq[E], steps ...Step[E, E]) iter.Seq[E]
- type Step
- func Filter[E any](predicate func(E) bool) Step[E, E]
- func FlatMap[S ~[]E, E any]() Step[S, E]
- func Limit[E any](limit int) Step[E, E]
- func Map[I, O any](mappger func(I) O) Step[I, O]
- func Peek[E any](action func(E)) Step[E, E]
- func Reverse[E any]() Step[E, E]
- func Skip[E any](num int) Step[E, E]
- func Sort[E cmp.Ordered]() Step[E, E]
- func Unique[E comparable]() Step[E, E]
Examples ΒΆ
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
func Chain ΒΆ
Example ΒΆ
package main import ( "fmt" "gitee.com/xuender/flow" "gitee.com/xuender/flow/seq" ) func main() { fmt.Println(seq.Max(flow.Chain( seq.Range(100), flow.Limit[int](3), flow.Filter(func(num int) bool { return num%2 == 0 }), ))) }
Output: 2 true
Types ΒΆ
Click to show internal directories.
Click to hide internal directories.