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

Modify document expressions #3497

Merged
merged 1 commit into from
Jun 25, 2020
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 4 additions & 4 deletions docs/src/main/tut/datatypes/kleisli.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ final case class Kleisli[F[_], A, B](run: A => F[B]) {
}
```

Below are some more methods on `Kleisli` that can be used so long as the constraint on `F[_]`
Below are some more methods on `Kleisli` that can be used as long as the constraint on `F[_]`
is satisfied.

```
Expand All @@ -119,8 +119,8 @@ traverse | Applicative
### Type class instances
The type class instances for `Kleisli`, like that for functions, often fix the input type (and the `F[_]`) and leave
the output type free. What type class instances it has tends to depend on what instances the `F[_]` has. For
instance, `Kleisli[F, A, B]` has a `Functor` instance so long as the chosen `F[_]` does. It has a `Monad`
instance so long as the chosen `F[_]` does. The instances in Cats are laid out in a way such that implicit
instance, `Kleisli[F, A, B]` has a `Functor` instance as long as the chosen `F[_]` does. It has a `Monad`
instance as long as the chosen `F[_]` does. The instances in Cats are laid out in a way such that implicit
resolution will pick up the most specific instance it can (depending on the `F[_]`).

An example of a `Monad` instance for `Kleisli` is shown below.
Expand Down Expand Up @@ -259,7 +259,7 @@ final case class Kleisli[F[_], A, B](run: A => F[B]) {

What `local` allows us to do is essentially "expand" our input type to a more "general" one. In our case, we
can take a `Kleisli` that expects a `DbConfig` or `ServiceConfig` and turn it into one that expects an `AppConfig`,
so long as we tell it how to go from an `AppConfig` to the other configs.
as long as we tell it how to go from an `AppConfig` to the other configs.

Now we can create our application config validator!

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/tut/typeclasses/typeclasses.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ implicit val intAdditionMonoid: Monoid[Int] = new Monoid[Int] {
def combineAll[A](list: List[A])(implicit A: Monoid[A]): A = list.foldRight(A.empty)(A.combine)
```

Now we can also `combineAll` a list of `Pair`s so long as `Pair`'s type parameters themselves have `Monoid`
Now we can also `combineAll` a list of `Pair`s as long as `Pair`'s type parameters themselves have `Monoid`
instances.

```tut:book:silent
Expand Down