Iter$IterResultExtension<T, E extends Object> extension
Methods
-
tryCollect()
→ Result<List<T>, E>
-
Transforms an iterator into a collection, short circuiting if a Err is encountered.
-
tryFind(bool f(T))
→ Result<Option<T>, E>
-
Applies function to the elements of iterator and returns the first true result or the first Err element.
-
tryFold<U>(U initial, U f(U, T))
→ Result<U, E>
-
An iterator method that applies a function producing a single value, returns Err is encounted.
-
tryForEach(void f(T))
→ Result<(), E>
-
An iterator method that applies a function, stopping at the first Err and returning that Err.
-
tryReduce(T f(T, T))
→ Result<Option<T>, E>
-
Reduces the elements to a single one by repeatedly applying a reducing operation. If a Err is encounted it is returned.