Skip to content

Add attemptOption to Alternative #2936

Open
@LukaJCB

Description

@LukaJCB
def attemptOption[A](fa: F[A]): F[Option[A]] =
  fa.map(_.some) <+> Option.empty[A].pure[F]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions