MaybeIterableTraverse<T> extension

Extension for traversing any iterable and using Maybe to represent the result.

on

Methods

mapMaybe<U>(Maybe<U> tryMap(T)) Maybe<List<U>>

Available on Iterable<T>, provided by the MaybeIterableTraverse extension

Traverses an iterable trying to map the elements with tryMap, returning None if either the iterable was empty or the result of every mapping operation was None.
traverse<U>(Maybe<U> tryMap(T)) Maybe<List<U>>

Available on Iterable<T>, provided by the MaybeIterableTraverse extension

Traverses an iterable trying to map the elements with tryMap, returning None if either the iterable was empty or the result of every mapping operation was None.