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

receiver-constrained example function should be renamed #2282

Merged
merged 1 commit into from Mar 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions arrow-site/docs/docs/io/README.md
Expand Up @@ -165,13 +165,13 @@ class DataModule(
```

We can also define top-level functions based on constraints on the receiver.
Here we define `getProcessUsers` which can only be called where `R` is both `Repo` and `Persistence`.
Here we define `getProcessedUsers` which can only be called where `R` is both `Repo` and `Persistence`.

```kotlin:ank
/**
* Generic top-level function based on syntax enabled by [Persistence] & [Repo] constraint
*/
suspend fun <R> R.getProcessUsers(): Either<PersistenceError, List<ProcessedUser>>
suspend fun <R> R.getProcessedUsers(): Either<PersistenceError, List<ProcessedUser>>
where R : Repo,
R : Persistence = fetchUsers().process()
```
Expand Down