typelevel/cats

Add `attemptOption` to Alternative

Open

#2.936 aberto em 9 de jul. de 2019

Ver no GitHub
 (6 comments) (0 reactions) (0 assignees)Scala (1.241 forks)batch import
help wantedlow-hanging fruit

Métricas do repositório

Stars
 (5.438 stars)
Métricas de merge de PR
 (Mesclagem média 4h 2m) (5 fundiu PRs em 30d)

Description

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

Guia do colaborador