Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add symbols to FAQ #1573

Merged
merged 6 commits into from
May 12, 2017
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions docs/src/main/tut/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ position: 4
* [What do types like `?` and `λ` mean?](#kind-projector)
* [What does `macro Ops` do? What is `cats.macros.Ops`?](#machinist)
* [What is `tailRecM`?](#tailrecm)
* [What does this symbol mean?](#symbol)
* [How can I help?](#contributing)

## <a id="what-imports" href="#what-imports"></a>What imports do I need?
Expand Down Expand Up @@ -202,6 +203,37 @@ If you're having trouble figuring out how to implement `tailRecM` lawfully, you

In some cases you may decide that providing a lawful `tailRecM` may be impractical or even impossible (if so we'd like to hear about it). For these cases we provide a way of testing all of the monad laws _except_ for the stack safety of `tailRecM`: just replace `MonadTests[F].monad[A, B, C]` in your tests with `MonadTests[F].stackUnsafeMonad[A, B, C]`.


## <a id="symbol" href="#symbol"></a>What does this symbol mean?

Below is a list of symbols used in cats.

The `~>`, `⊥`, `⊤`, `:<:` and `:≺:` symbols can be imported with `import cats._`.

All other symbols can be imported with `import cats.implicits._`

| Symbol | Name | Nickname | Type Class | Signature |
| -------------------------------- | ---------------------- | ---------------- | ----------------------- | --------------------------------------------------------- |
| <code>fa &#124;@&#124; fb</code> | Cartesian builder | Cinnabon, scream | `Cartesian[F[_]]` | <code>&#124;@&#124;(fa: F[A])(fb: F[B]): F[(A, B)]</code> |
| `fa *> fb` | right apply | | `Cartesian[F[_]]` | `*>(fa: F[A])(fb: F[B]): F[A]` |
| `fa <* fb` | left apply | | `Cartesian[F[_]]` | `<*(fa: F[A])(fb: F[B]): F[B]` |
| `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]` |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of #1537 there is also << (FlatMap#forEffect).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've now added that

| <code>x &#124;-&#124; y</code> | 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` |
| <code>x &#124;+&#124; y</code> | 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` | natural transformation | | `FunctionK[F[_], G[_]]` | `FunctionK` alias |
| `F :<: G` | injectK | | `InjectK[F[_], G[_]]` | `InjectK` alias |
| `F :≺: G` | injectK | | `InjectK[F[_], G[_]]` | `InjectK` alias |
| `⊥` | bottom | | N/A | `Nothing` |
| `⊤` | top | | N/A | `Any` |

## <a id="contributing" href="#contributing"></a>How can I help?

The cats community welcomes and encourages contributions, even if you are completely new to cats and functional programming. Here are a few ways to help out:
Expand Down
31 changes: 0 additions & 31 deletions docs/src/main/tut/typeclasses/symbols.md

This file was deleted.