Created
October 18, 2017 21:29
-
-
Save LukaJCB/1815121a2236b8498ce9a21c0563efa7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@typeclass trait NonEmptyTraverseUnordered[F[_]] { | |
def nonEmptyTraverseUnordered[G[_]: CommutativeApply, A, B](sa: F[A])(f: A => G[B]): G[F[B]] | |
def nonEmptySequenceUnordered[G[_]: CommutativeApply, A](fga: F[G[A]]): G[F[A]] = | |
nonEmptyTraverseUnordered(fga)(identity) | |
} | |
@typeclass trait NonEmptyCommutativeParallel[F[_], M[_]] { | |
def commutativeApply: CommutativeApply[F] | |
def commutativeFlatMap: CommutativeFlatMap[M] | |
def sequential: F ~> M | |
def parallel: M ~> F | |
} | |
@typeclass trait CommutativeParallel[F[_], M[_]] extends NonEmptyCommutativeParallel[F, M] { | |
def commutativeApplicative: CommutativeApplicative[F] | |
def commutativeMonad: CommutativeMonad[M] | |
def commutativeApply = commutativeApplicative | |
def commutativeFlatMap = commutativeMonad | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment