这是indexloc提供的服务,不要输入任何密码
Skip to content

Ior.sequence/accumulateBoth? #1046

@ayush-finix

Description

@ayush-finix

Not sure if this makes sense, but should there be a helper function that can turn something like a Iterable<Ior<S, T>> to an Ior<U<S>, V<T>>.

As a real use case (and maybe you could tell me an alternative to my current implementation if the functionality exists), I take a List<Msg>, do stuff to get a List<Tuple2<Msg, Try<Out, Exception>>>, then collect/accumulate to get a Tuple2<List<Tuple2<Msg, Out>>, List<Tuple2<Msg, Exception>>>. I feel like I could simplify this with an accumulateBoth Ior option, but perhaps there's already an easier way and I don't know about it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions