typelevel/cats

Add `attemptOption` to Alternative

オープン

#2,936 opened on 2019/07/09

 (6 件のコメント) (0 件のリアクション) (0 人の担当者)Scala (1,241 件のフォーク)batch import
help wantedlow-hanging fruit

Repository metrics

Stars
 (5,438 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド