From fd0e0abe3b3d40340d0d261fbd39658ec54730fa Mon Sep 17 00:00:00 2001 From: Stephen Lazaro Date: Tue, 5 Dec 2017 19:33:00 -0800 Subject: [PATCH 1/2] Dedeprecate >>, add &> and <& --- docs/src/main/tut/faq.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/src/main/tut/faq.md b/docs/src/main/tut/faq.md index 4e3c3885a8..0f0e7fbf3c 100644 --- a/docs/src/main/tut/faq.md +++ b/docs/src/main/tut/faq.md @@ -217,6 +217,7 @@ All other symbols can be imported with `import cats.implicits._` | `x === y` | equals | | `Eq[A]` | `eqv(x: A, y: A): Boolean` | | `x =!= y` | not equals | | `Eq[A]` | `neqv(x: A, y: A): Boolean` | | `fa >>= f` | flatMap | | `FlatMap[F[_]]` | `flatMap(fa: F[A])(f: A => F[B]): F[B]` | +| `fa >> fb` | followed by | | `FlatMap[F[_]]` | `followedBy(fa: F[A])(fb: F[B]): F[B]` | | x |-| y | remove | | `Group[A]` | `remove(x: A, y: A): A` | | `x > y` | greater than | | `PartialOrder[A]` | `gt(x: A, y: A): Boolean` | | `x >= y` | greater than or equal | | `PartialOrder[A]` | `gteq(x: A, y: A): Boolean` | @@ -229,9 +230,10 @@ All other symbols can be imported with `import cats.implicits._` | `F ~> G` | natural transformation | | `FunctionK[F[_], G[_]]` | `FunctionK` alias | | `F :<: G` | injectK | | `InjectK[F[_], G[_]]` | `InjectK` alias | | `F :≺: G` | injectK | | `InjectK[F[_], G[_]]` | `InjectK` alias | +| `fa &> fb` | parallel followed by | | `Parallel[M[_], F[_]]` | `parFollowedBy[A, B](ma: M[A])(mb: M[B]): M[B]` | +| `fa <& fb` | parallel for effect | | `Parallel[M[_], F[_]]` | `parForEffect[A, B](ma: M[A])(mb: M[B]): M[A]` | | `⊥` | bottom | | N/A | `Nothing` | | `⊤` | top | | N/A | `Any` | -| `fa >> fb` (Deprecated) | followed by | | `FlatMap[F[_]]` | `followedBy(fa: F[A])(fb: F[B]): F[B]` | | `fa << fb` (Deprecated) | for effect | | `FlatMap[F[_]]` | `forEffect(fa: F[A])(fb: F[B]): F[A]` | ## How can I test instances against their type classes' laws? From 51daa0a27c757946b86765cfa62b6892062aca72 Mon Sep 17 00:00:00 2001 From: Stephen Lazaro Date: Tue, 5 Dec 2017 19:56:59 -0800 Subject: [PATCH 2/2] Add -< and && --- docs/src/main/tut/faq.md | 52 +++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/docs/src/main/tut/faq.md b/docs/src/main/tut/faq.md index 0f0e7fbf3c..f7a9c40720 100644 --- a/docs/src/main/tut/faq.md +++ b/docs/src/main/tut/faq.md @@ -210,31 +210,33 @@ The `~>`, `⊥`, `⊤`, `:<:` and `:≺:` symbols can be imported with `import c All other symbols can be imported with `import cats.implicits._` -| Symbol | Name | Nickname | Type Class | Signature | -| -------------------------------- | ---------------------- | ---------------- | ----------------------- | --------------------------------------------------------- | -| `fa *> fb` | followed by | | `Apply[F[_]]` | `followedBy(fa: F[A])(fb: F[B]): F[B]` | -| `fa <* fb` | for effect | | `Apply[F[_]]` | `forEffect(fa: F[A])(fb: F[B]): F[A]` | -| `x === y` | equals | | `Eq[A]` | `eqv(x: A, y: A): Boolean` | -| `x =!= y` | not equals | | `Eq[A]` | `neqv(x: A, y: A): Boolean` | -| `fa >>= f` | flatMap | | `FlatMap[F[_]]` | `flatMap(fa: F[A])(f: A => F[B]): F[B]` | -| `fa >> fb` | followed by | | `FlatMap[F[_]]` | `followedBy(fa: F[A])(fb: F[B]): F[B]` | -| x |-| y | remove | | `Group[A]` | `remove(x: A, y: A): A` | -| `x > y` | greater than | | `PartialOrder[A]` | `gt(x: A, y: A): Boolean` | -| `x >= y` | greater than or equal | | `PartialOrder[A]` | `gteq(x: A, y: A): Boolean` | -| `x < y` | less than | | `PartialOrder[A]` | `lt(x: A, y: A): Boolean` | -| `x <= y` | less than or equal | | `PartialOrder[A]` | `lteq(x: A, y: A): Boolean` | -| x |+| y | Semigroup combine | | `Semigroup[A]` | `combine(x: A, y: A): A` | -| `x <+> y` | SemigroupK combine | | `SemigroupK[F[_]]` | `combineK(x: F[A], y: F[A]): F[A]` | -| `f <<< g` | Arrow compose | | `Compose[F[_, _]]` | `compose(f: F[B, C], g: F[A, B]): F[A, C]` | -| `f >>> g` | Arrow andThen | | `Compose[F[_, _]]` | `andThen(f: F[B, C], g: F[A, B]): F[A, C]` | -| `F ~> G` | natural transformation | | `FunctionK[F[_], G[_]]` | `FunctionK` alias | -| `F :<: G` | injectK | | `InjectK[F[_], G[_]]` | `InjectK` alias | -| `F :≺: G` | injectK | | `InjectK[F[_], G[_]]` | `InjectK` alias | -| `fa &> fb` | parallel followed by | | `Parallel[M[_], F[_]]` | `parFollowedBy[A, B](ma: M[A])(mb: M[B]): M[B]` | -| `fa <& fb` | parallel for effect | | `Parallel[M[_], F[_]]` | `parForEffect[A, B](ma: M[A])(mb: M[B]): M[A]` | -| `⊥` | bottom | | N/A | `Nothing` | -| `⊤` | top | | N/A | `Any` | -| `fa << fb` (Deprecated) | for effect | | `FlatMap[F[_]]` | `forEffect(fa: F[A])(fb: F[B]): F[A]` | +| Symbol | Name | Nickname | Type Class | Signature | +| -------------------------------- | -------------------------| ---------------- | ----------------------- | --------------------------------------------------------------------| +| `fa *> fb` | followed by | | `Apply[F[_]]` | `followedBy(fa: F[A])(fb: F[B]): F[B]` | +| `fa <* fb` | for effect | | `Apply[F[_]]` | `forEffect(fa: F[A])(fb: F[B]): F[A]` | +| `x === y` | equals | | `Eq[A]` | `eqv(x: A, y: A): Boolean` | +| `x =!= y` | not equals | | `Eq[A]` | `neqv(x: A, y: A): Boolean` | +| `fa >>= f` | flatMap | | `FlatMap[F[_]]` | `flatMap(fa: F[A])(f: A => F[B]): F[B]` | +| `fa >> fb` | followed by | | `FlatMap[F[_]]` | `followedBy(fa: F[A])(fb: F[B]): F[B]` | +| x |-| y | remove | | `Group[A]` | `remove(x: A, y: A): A` | +| `x > y` | greater than | | `PartialOrder[A]` | `gt(x: A, y: A): Boolean` | +| `x >= y` | greater than or equal | | `PartialOrder[A]` | `gteq(x: A, y: A): Boolean` | +| `x < y` | less than | | `PartialOrder[A]` | `lt(x: A, y: A): Boolean` | +| `x <= y` | less than or equal | | `PartialOrder[A]` | `lteq(x: A, y: A): Boolean` | +| x |+| y | Semigroup combine | | `Semigroup[A]` | `combine(x: A, y: A): A` | +| `x <+> y` | SemigroupK combine | | `SemigroupK[F[_]]` | `combineK(x: F[A], y: F[A]): F[A]` | +| `f <<< g` | Arrow compose | | `Compose[F[_, _]]` | `compose(f: F[B, C], g: F[A, B]): F[A, C]` | +| `f >>> g` | Arrow andThen | | `Compose[F[_, _]]` | `andThen(f: F[B, C], g: F[A, B]): F[A, C]` | +| `f &&& g` | Arrow merge | | `Arrow[F[_, _]]` | `merge[A, B, C](f: F[A, B], g: F[A, C]): F[A, (B, C)]` | +| `f -< g` | Arrow combine and bypass | | `Arrow[F[_, _]]` | `combineAndByPass[A, B, C](f: F[A, B], g: F[B, C]): F[A, (B, C)]` | +| `F ~> G` | natural transformation | | `FunctionK[F[_], G[_]]` | `FunctionK` alias | +| `F :<: G` | injectK | | `InjectK[F[_], G[_]]` | `InjectK` alias | +| `F :≺: G` | injectK | | `InjectK[F[_], G[_]]` | `InjectK` alias | +| `fa &> fb` | parallel followed by | | `Parallel[M[_], F[_]]` | `parFollowedBy[A, B](ma: M[A])(mb: M[B]): M[B]` | +| `fa <& fb` | parallel for effect | | `Parallel[M[_], F[_]]` | `parForEffect[A, B](ma: M[A])(mb: M[B]): M[A]` | +| `⊥` | bottom | | N/A | `Nothing` | +| `⊤` | top | | N/A | `Any` | +| `fa << fb` (Deprecated) | for effect | | `FlatMap[F[_]]` | `forEffect(fa: F[A])(fb: F[B]): F[A]` | ## How can I test instances against their type classes' laws?