Skip to content

3.x: Swap Maybe.flatMapSingle and Maybe.flatMapSingleElement ? #6878

Closed
@akarnokd

Description

@akarnokd

Currently, flatMapSingle returns Single and signals NoSuchElementException if the source Maybe is empty. flatMapSingleElement remains Maybe.

I'd consider renaming flatMapSingle to flatMapSingleOrError and flatMapSingleElement to flatMapSingle as I think a default Maybe -> Maybe transformer should better match the other such transformers.

Alternatively, drop flatMapSingle and rename flatMapSingleElement to flatMapSingle so that the original behavior could be achieved via flatMapSingle.toSingle()).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions