add uncozip?
Open
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 5.5k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 5
Description
Would there be interest in adding something like this on Functor?
def uncozip[F[_]: Functor, A, B](feither: Either[F[A], F[B]]): F[Either[A, B]] =
feither.fold[F[Either[A, B]]](
Functor[F].lift(Left.apply[A, B]),
Functor[F].lift(Right.apply[A, B])
)
cf. https://hackage.haskell.org/package/adjunctions-4.4/docs/Data-Functor-Adjunction.html
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Functor API and the proposed uncozip signature, then compare it with the linked Haskell Data-Functor-Adjunction reference. Done means determining whether this operation belongs on Functor and, if accepted, identifying the relevant implementation, tests, and documentation locations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100