EnumerableWithIndex provides functions for ordered containers whose values can be fetched by an index.
| 6 | |
| 7 | // EnumerableWithIndex provides functions for ordered containers whose values can be fetched by an index. |
| 8 | type EnumerableWithIndex interface { |
| 9 | // Each calls the given function once for each element, passing that element's index and value. |
| 10 | Each(func(index int, value interface{})) |
| 11 | |
| 12 | // Map invokes the given function once for each element and returns a |
| 13 | // container containing the values returned by the given function. |
| 14 | // Map(func(index int, value interface{}) interface{}) Container |
| 15 | |
| 16 | // Select returns a new container containing all elements for which the given function returns a true value. |
| 17 | // Select(func(index int, value interface{}) bool) Container |
| 18 | |
| 19 | // Any passes each element of the container to the given function and |
| 20 | // returns true if the function ever returns true for any element. |
| 21 | Any(func(index int, value interface{}) bool) bool |
| 22 | |
| 23 | // All passes each element of the container to the given function and |
| 24 | // returns true if the function returns true for all elements. |
| 25 | All(func(index int, value interface{}) bool) bool |
| 26 | |
| 27 | // Find passes each element of the container to the given function and returns |
| 28 | // the first (index,value) for which the function is true or -1,nil otherwise |
| 29 | // if no element matches the criteria. |
| 30 | Find(func(index int, value interface{}) bool) (int, interface{}) |
| 31 | } |
| 32 | |
| 33 | // EnumerableWithKey provides functions for ordered containers whose values whose elements are key/value pairs. |
| 34 | type EnumerableWithKey interface { |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…